Timers: Contained the timer loop into a function.
The main timer loop is now moved into main() itself together with
checking the async signal handlers. It also allows for more transparent
private timer loops as BFD needs. (TBD)
Now the basic usage is:
struct timeloop loop;
timers_init(&loop, pool, name);
/* Here you should set some timers by tm_set() or tm_start(). */
while (1) {
timers_wait(&loop); /* Wait for the first timer */
timers_fire(&loop); /* Run all the timers that have expired */
}
Loading
Please sign in to comment