X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Ftimer%2Ftest%2Frun-ff.c;h=37f035da4ba167c2cd6cd9bc696877b889784ab1;hb=b97c7f0841f5173a07a2571f2c99f944d8405a90;hp=49c6e3744c1e3e9991e9fea9db09f5ac2f3decdd;hpb=a9d42b8d3bf2b37f47caa428e869fceb4bb33082;p=ccan diff --git a/ccan/timer/test/run-ff.c b/ccan/timer/test/run-ff.c index 49c6e374..37f035da 100644 --- a/ccan/timer/test/run-ff.c +++ b/ccan/timer/test/run-ff.c @@ -3,10 +3,10 @@ #include #include -static struct timeabs timeabs_from_usec(unsigned long long usec) +static struct timemono timemono_from_usec(unsigned long long usec) { - struct timeabs epoch = { { 0, 0 } }; - return timeabs_add(epoch, time_from_usec(usec)); + struct timemono epoch = { { 0, 0 } }; + return timemono_add(epoch, time_from_usec(usec)); } int main(void) @@ -17,13 +17,13 @@ int main(void) /* This is how many tests you plan to run */ plan_tests(3); - timers_init(&timers, timeabs_from_usec(1364726722653919ULL)); + timers_init(&timers, timemono_from_usec(1364726722653919ULL)); timer_init(&t); - timer_add(&timers, &t, timeabs_from_usec(1364726722703919ULL)); - ok1(!timers_expire(&timers, timeabs_from_usec(1364726722653920ULL))); - expired = timers_expire(&timers, timeabs_from_usec(1364726725454187ULL)); + timer_addmono(&timers, &t, timemono_from_usec(1364726722703919ULL)); + ok1(!timers_expire(&timers, timemono_from_usec(1364726722653920ULL))); + expired = timers_expire(&timers, timemono_from_usec(1364726725454187ULL)); ok1(expired == &t); - ok1(!timers_expire(&timers, timeabs_from_usec(1364726725454187ULL))); + ok1(!timers_expire(&timers, timemono_from_usec(1364726725454187ULL))); timers_cleanup(&timers); /* This exits depending on whether all tests passed */