diff options
author | David Robillard <d@drobilla.net> | 2023-05-22 23:13:54 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-05-22 23:13:54 -0400 |
commit | 136a0204414f74af6d06649d0f1554234ca4eded (patch) | |
tree | 3f9f9bdf9be08ff0f4c1e3dcd38d97a6753fa993 /test | |
parent | 0fac728dc65385af2c8e0b7a0fdc373e3c550ca8 (diff) | |
download | pugl-136a0204414f74af6d06649d0f1554234ca4eded.tar.gz pugl-136a0204414f74af6d06649d0f1554234ca4eded.tar.bz2 pugl-136a0204414f74af6d06649d0f1554234ca4eded.zip |
Speed up and improve reliability of timer test
Diffstat (limited to 'test')
-rw-r--r-- | test/test_timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_timer.c b/test/test_timer.c index 262322f..1c9f281 100644 --- a/test/test_timer.c +++ b/test/test_timer.c @@ -28,7 +28,7 @@ static const double timeout = -1.0; #endif // Windows SetTimer has a maximum resolution of 10ms -static const double tolerance = 0.014; +static const double tolerance = 0.015; typedef enum { START, @@ -140,7 +140,7 @@ checkTimerPeriod(const TimerStats* const stats, const double expectedPeriod) int main(int argc, char** argv) { - const double updateDuration = timerPeriod(NUM_TIMERS - 1U) * 10.0; + const double updateDuration = 0.6; const double otherTimerPeriod = timerPeriod(0) * 3.0; PuglTest test = {puglNewWorld(PUGL_PROGRAM, 0), @@ -206,7 +206,7 @@ main(int argc, char** argv) for (unsigned i = 1U; i < NUM_TIMERS - 1U; ++i) { assert(!puglStopTimer(test.view, i)); } - assert(!puglUpdate(test.world, timerPeriod(NUM_TIMERS - 1))); + assert(!puglUpdate(test.world, 0.0)); for (unsigned i = 0U; i < NUM_TIMERS; ++i) { assert(test.stats[0].numAlarms == 0); } |