From: Felix Fietkau Date: Wed, 31 Oct 2012 19:03:45 +0000 (+0100) Subject: uloop: fix sub-second timer offsets for uloop_timeout_set X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=33b9f3aa0b59feb3c492684cdb4a5340ef3f18d9;p=project%2Flibubox.git uloop: fix sub-second timer offsets for uloop_timeout_set --- diff --git a/uloop.c b/uloop.c index aa09750..bd09260 100644 --- a/uloop.c +++ b/uloop.c @@ -341,7 +341,7 @@ int uloop_timeout_set(struct uloop_timeout *timeout, int msecs) gettimeofday(&timeout->time, NULL); time->tv_sec += msecs / 1000; - time->tv_usec += msecs % 1000; + time->tv_usec += (msecs % 1000) * 1000; if (time->tv_usec > 1000000) { time->tv_sec++;