Skip to content

Commit

Permalink
Merge PR #3099: src/tests: make TestTimer's resolution test more VM f…
Browse files Browse the repository at this point in the history
…riendly.
  • Loading branch information
mkrautz committed May 25, 2017
2 parents 4481729 + 389d82b commit 3754898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tests/TestTimer/TestTimer.cpp
Expand Up @@ -18,7 +18,7 @@ class TestTimer : public QObject {
// This tests that the timer implemented by the Timer
// class is a high resolution timer. In this case, we
// check that the output of the elapsed() method changes
// at least every 5 microseconds.
// at least every 100 microseconds.
void TestTimer::resolution() {
Timer t;

Expand All @@ -43,8 +43,8 @@ void TestTimer::resolution() {
qWarning("Number of elapsed changes: %llu", static_cast<unsigned long long>(nchanges));
qWarning("Resolution: %.2f microseconds", usecsPerChange);

if (usecsPerChange >= 5.0f) {
QFAIL("Insufficient timer resolution. Got >= 5 usec, expected < 5 usec resolution...");
if (usecsPerChange >= 100.0f) {
QFAIL("Insufficient timer resolution. Got >= 100 usec, expected < 100 usec resolution...");
}
}

Expand Down

0 comments on commit 3754898

Please sign in to comment.