summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2011-07-07 17:43:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2011-07-08 01:14:52 +0200
commitbeeda6af44e72e3a20fcd2837b231a04354790fa (patch)
treee76d8b473df61139842e88316712bfbef05e2a86 /sysdep/unix
parent7d4e923603fdb43b6f017e5ef78e37d0891c699c (diff)
downloadbird-beeda6af44e72e3a20fcd2837b231a04354790fa.tar
bird-beeda6af44e72e3a20fcd2837b231a04354790fa.zip
Removes timers for stub interfaces. Also fixes some minor bugs.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/timer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdep/unix/timer.h b/sysdep/unix/timer.h
index 3ed6ff1..a20df48 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 */