Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
*e = tmp;
}
+struct timeval
+thread_timer_remain(struct thread *thread)
+{
+ quagga_get_relative(NULL);
+
+ return timeval_subtract(thread->u.sands, relative_time);
+}
+
/* Get new thread. */
static struct thread *
thread_get (struct thread_master *m, u_char type,
extern struct thread *thread_fetch (struct thread_master *, struct thread *);
extern void thread_call (struct thread *);
extern unsigned long thread_timer_remain_second (struct thread *);
+extern struct timeval thread_timer_remain(struct thread*);
extern int thread_should_yield (struct thread *);
extern unsigned long timeval_elapsed (struct timeval a, struct timeval b);
/* set yield time for thread */