blob: 0d07ab1cb360ada25321669b57d51b331b324405 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$NetBSD: patch-ai,v 1.1 2007/05/07 12:42:19 tnn Exp $
--- src/timers.c.orig 2007-05-07 14:22:37.000000000 +0200
+++ src/timers.c
@@ -128,7 +128,7 @@ fix_time (long *secs, long *msecs)
*msecs += 1000;
(*secs)--;
}
- while (*msecs > 1000)
+ while (*msecs >= 1000)
{
*msecs -= 1000;
(*secs)++;
@@ -252,6 +252,7 @@ to re-enable it.
t->function = fun;
t->secs = rep_get_long_int (secs);
t->msecs = rep_get_long_int (msecs);
+ fix_time (&t->secs, &t->msecs);
t->next_alloc = allocated_timers;
allocated_timers = t;
insert_timer (t);
@@ -290,6 +291,7 @@ duration. Otherwise, the existing values
{
TIMER(timer)->secs = rep_get_long_int (secs);
TIMER(timer)->msecs = rep_get_long_int (msecs);
+ fix_time (&TIMER (timer)->secs, &TIMER (timer)->msecs);
}
insert_timer (TIMER(timer));
return timer;
|