MCPcopy Create free account
hub / github.com/ElementsProject/lightning / main

Function main

ccan/ccan/timer/test/run-ff.c:12–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10}
11
12int main(void)
13{
14 struct timers timers;
15 struct timer t, *expired;
16
17 /* This is how many tests you plan to run */
18 plan_tests(3);
19
20 timers_init(&timers, timemono_from_usec(1364726722653919ULL));
21 timer_init(&t);
22 timer_addmono(&timers, &t, timemono_from_usec(1364726722703919ULL));
23 ok1(!timers_expire(&timers, timemono_from_usec(1364726722653920ULL)));
24 expired = timers_expire(&timers, timemono_from_usec(1364726725454187ULL));
25 ok1(expired == &t);
26 ok1(!timers_expire(&timers, timemono_from_usec(1364726725454187ULL)));
27 timers_cleanup(&timers);
28
29 /* This exits depending on whether all tests passed */
30 return exit_status();
31}

Callers

nothing calls this directly

Calls 6

timers_initFunction · 0.85
timemono_from_usecFunction · 0.85
timer_initFunction · 0.85
timer_addmonoFunction · 0.85
timers_expireFunction · 0.85
timers_cleanupFunction · 0.85

Tested by

no test coverage detected