From 514791e5c6ded690aaf6dc43709dd02bc6a2ff6a Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 22 Aug 2017 14:58:12 +0200 Subject: 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. --- src/lib/tests/timerwheel_test.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib/tests') 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; } -- cgit v1.2.3