1 #include <ccan/timer/timer.h>
2 /* Include the C files directly. */
3 #include <ccan/timer/timer.c>
4 #include <ccan/tap/tap.h>
10 struct list_head expired;
12 /* This is how many tests you plan to run */
15 timers_init(&timers, time_from_usec(1364726722653919ULL));
16 timer_add(&timers, &t, time_from_usec(1364726722703919ULL));
17 timers_expire(&timers, time_from_usec(1364726722653920ULL), &expired);
18 ok1(list_empty(&expired));
19 timers_expire(&timers, time_from_usec(1364726725454187ULL), &expired);
20 ok1(!list_empty(&expired));
21 ok1(list_top(&expired, struct timer, list) == &t);
23 timers_cleanup(&timers);
25 /* This exits depending on whether all tests passed */