2004-12-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

	* thread.c: (funcname_thread_add_timer_msec) Reduce overflow risk.
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 07eb21d..cc5f867 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
+
+	* thread.c: (funcname_thread_add_timer_msec) Reduce overflow risk.
+
 2004-12-21 Paul Jakma <paul.jakma@sun.com>
 
 	* if.h: Add more 'non-generic' IFF_ flags.
diff --git a/lib/thread.c b/lib/thread.c
index 89df06a..05212d8 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -550,10 +550,8 @@
 
   assert (m != NULL);
 
-  timer = 1000*timer; /* milli -> micro */
-
-  trel.tv_sec = timer / TIMER_SECOND_MICRO;
-  trel.tv_usec = (timer % TIMER_SECOND_MICRO);
+  trel.tv_sec = timer / 1000;
+  trel.tv_usec = 1000*(timer % 1000);
 
   return funcname_thread_add_timer_timeval (m, func, arg, &trel, funcname);
 }