Skip to content
Commit fbaf1c7c authored by Maria Matejka's avatar Maria Matejka
Browse files

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 */
}
parent 4b68f60f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment