diff options
author | Sander Vrijders <[email protected]> | 2017-08-22 14:58:12 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2017-08-22 15:00:56 +0200 |
commit | 514791e5c6ded690aaf6dc43709dd02bc6a2ff6a (patch) | |
tree | b751a94678188772c5772261549fe772a7872427 /src/lib/tests | |
parent | 911a0ba062f7fd9debfebd330e94ff7de6ac1101 (diff) | |
download | ouroboros-514791e5c6ded690aaf6dc43709dd02bc6a2ff6a.tar.gz ouroboros-514791e5c6ded690aaf6dc43709dd02bc6a2ff6a.zip |
lib: Make timerwheel a passive component
This turns the timerwheel into a passive component since it is used by
application using the library. The user of the timerwheel now has to
call timerwheel_move to advance the timerwheel.
Diffstat (limited to 'src/lib/tests')
-rw-r--r-- | src/lib/tests/timerwheel_test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/tests/timerwheel_test.c b/src/lib/tests/timerwheel_test.c index d9ca164e..d7478487 100644 --- a/src/lib/tests/timerwheel_test.c +++ b/src/lib/tests/timerwheel_test.c @@ -91,14 +91,12 @@ int timerwheel_test(int argc, char ** argv) nanosleep(&wait, NULL); - /* On some systems and VMs, the scheduler may be too slow. */ - if (total != check_total) - nanosleep(&wait, NULL); + timerwheel_move(tw); timerwheel_destroy(tw); if (total != check_total) { - printf("Totals do not match.\n"); + printf("Totals do not match: %d and %d.\n", total, check_total); return -1; } |