summaryrefslogtreecommitdiff
path: root/src/lib/tests/timerwheel_test.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-08-22 14:58:12 +0200
committerSander Vrijders <sander.vrijders@ugent.be>2017-08-22 15:00:56 +0200
commit514791e5c6ded690aaf6dc43709dd02bc6a2ff6a (patch)
treeb751a94678188772c5772261549fe772a7872427 /src/lib/tests/timerwheel_test.c
parent911a0ba062f7fd9debfebd330e94ff7de6ac1101 (diff)
downloadouroboros-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/timerwheel_test.c')
-rw-r--r--src/lib/tests/timerwheel_test.c6
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;
}