summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2004-10-11 09:40:58 +0000
committerpaul <paul>2004-10-11 09:40:58 +0000
commit9076fbd333cbd39b0fae7848de533dfe376af7fe (patch)
treede174ccba2e91b65ab50fa505c8daad9a719955e
parent0c083ee9d870bf02a36563ae1807f3894ac24219 (diff)
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].
-rw-r--r--lib/ChangeLog6
-rw-r--r--lib/thread.c6
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);
}