diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2011-07-07 17:43:39 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2011-07-08 01:14:52 +0200 |
commit | beeda6af44e72e3a20fcd2837b231a04354790fa (patch) | |
tree | e76d8b473df61139842e88316712bfbef05e2a86 /sysdep | |
parent | 7d4e923603fdb43b6f017e5ef78e37d0891c699c (diff) |
Removes timers for stub interfaces. Also fixes some minor bugs.
Diffstat (limited to 'sysdep')
-rw-r--r-- | sysdep/unix/timer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdep/unix/timer.h b/sysdep/unix/timer.h index 3ed6ff16..a20df483 100644 --- a/sysdep/unix/timer.h +++ b/sysdep/unix/timer.h @@ -30,6 +30,17 @@ void tm_start(timer *, unsigned after); void tm_stop(timer *); void tm_dump_all(void); +static inline timer * +tm_new_set(pool *p, void (*hook)(struct timer *), void *data, unsigned rand, unsigned rec) +{ + timer *t = tm_new(p); + t->hook = hook; + t->data = data; + t->randomize = rand; + t->recurrent = rec; + return t; +} + extern bird_clock_t now; /* Relative, monotonic time in seconds */ extern bird_clock_t now_real; /* Time in seconds since fixed known epoch */ |