uloop: another timer fix
authorFelix Fietkau <nbd@openwrt.org>
Wed, 31 Oct 2012 19:09:47 +0000 (20:09 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 31 Oct 2012 19:09:47 +0000 (20:09 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
uloop.c

diff --git a/uloop.c b/uloop.c
index bd09260c11ccba68d414e441e7af9971f46add10..6bc974dbf9b6a574a31b31df245519b50cadd2d0 100644 (file)
--- a/uloop.c
+++ b/uloop.c
@@ -345,7 +345,7 @@ int uloop_timeout_set(struct uloop_timeout *timeout, int msecs)
 
        if (time->tv_usec > 1000000) {
                time->tv_sec++;
-               time->tv_usec %= 100000;
+               time->tv_usec %= 1000000;
        }
 
        return uloop_timeout_add(timeout);