lib: add thread_add_timer_tv (struct timeval)
Another zoo extension, this adds a timer scheduling function that takes
a struct timeval argument (which is actually what the wrappers boil down
to, yet it's not exposed...)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/lib/thread.c b/lib/thread.c
index 6fcddd7..39e79ad 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -896,6 +896,17 @@
arg, &trel, debugargpass);
}
+/* Add timer event thread with "millisecond" resolution */
+struct thread *
+funcname_thread_add_timer_tv (struct thread_master *m,
+ int (*func) (struct thread *),
+ void *arg, struct timeval *tv,
+ debugargdef)
+{
+ return funcname_thread_add_timer_timeval (m, func, THREAD_TIMER,
+ arg, tv, debugargpass);
+}
+
/* Add a background thread, with an optional millisec delay */
struct thread *
funcname_thread_add_background (struct thread_master *m,