X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftimer%2Ftest%2Frun-add.c;h=9ad44b7e347608f9040310a40292271669b76a80;hb=HEAD;hp=a7ea4f602a9c255d20741d17359a26ea98d4222a;hpb=daf9ee7d8e2b683ff05283beb1843611ad8c9e8a;p=ccan diff --git a/ccan/timer/test/run-add.c b/ccan/timer/test/run-add.c index a7ea4f60..9ad44b7e 100644 --- a/ccan/timer/test/run-add.c +++ b/ccan/timer/test/run-add.c @@ -20,7 +20,7 @@ int main(void) struct timer t; uint64_t diff; unsigned int i; - struct timeabs epoch = { { 0, 0 } }; + struct timemono epoch = { { 0, 0 } }; /* This is how many tests you plan to run */ plan_tests(2 + (18 + (MAX_ORD - 4) * 3) * (18 + (MAX_ORD - 4) * 3)); @@ -32,12 +32,13 @@ int main(void) add_level(&timers, i); i = 0; + timer_init(&t); for (diff = 0; diff < (1ULL << MAX_ORD)+2; diff = next(diff)) { i++; for (timers.base = 0; timers.base < (1ULL << MAX_ORD)+2; timers.base = next(timers.base)) { - timer_add(&timers, &t, grains_to_time(timers.base + diff)); + timer_addmono(&timers, &t, grains_to_time(timers.base + diff)); ok1(timers_check(&timers, NULL)); timer_del(&timers, &t); }