summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2016-07-28 17:23:42 +0200
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-07-28 07:27:47 -0400
commitd03c4cbd9ac03926501fbb822b05b1c9a04b65cb (patch)
tree022508c4f546c6fc7f5c2f649374dd9e0b002361 /lib/thread.c
parentb21e9619c50276540bc447007a8b43ded267c7fe (diff)
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>
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 0b50f9edeb..f3b0bdf8a5 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -941,6 +941,17 @@ funcname_thread_add_timer_msec (struct thread_master *m,
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,