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 bd09260..6bc974d 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);