diff options
-rw-r--r-- | lib/ChangeLog | 6 | ||||
-rw-r--r-- | lib/thread.c | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index dc8fae8a..30eafa81 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2004-10-11 Paul Jakma <paul@dishone.st> + + * thread.c: (funcname_thread_add_timer) + (funcname_thread_add_timer_msec) Fix mistakes from last change. + Pointed out by Liu Xin in [quagga-dev 1609]. + 2004-10-10 Paul Jakma <paul@dishone.st> * version.h.in: (pid_output*) add const qualifier. diff --git a/lib/thread.c b/lib/thread.c index 2847b8bf..e1625e39 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -534,7 +534,7 @@ funcname_thread_add_timer (struct thread_master *m, assert (m != NULL); - trel.tv_sec += timer; + trel.tv_sec = timer; trel.tv_usec = 0; return funcname_thread_add_timer_timeval (m, func, arg, &trel, funcname); @@ -552,8 +552,8 @@ funcname_thread_add_timer_msec (struct thread_master *m, timer = 1000*timer; /* milli -> micro */ - trel.tv_sec += timer / TIMER_SECOND_MICRO; - trel.tv_usec += (timer % TIMER_SECOND_MICRO); + trel.tv_sec = timer / TIMER_SECOND_MICRO; + trel.tv_usec = (timer % TIMER_SECOND_MICRO); return funcname_thread_add_timer_timeval (m, func, arg, &trel, funcname); } |