Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-12 23:33:32 +0300
committerFelix Fietkau <nbd@openwrt.org>2011-02-12 23:33:32 +0300
commit9abfbad95fc5bec86840ad5121370ddd419db3de (patch)
tree02e3b81780c18aac9e95af200cc490f6f8c595b9 /uloop.c
parent83037e345dd702f2a013322139ef0b7bab7e170f (diff)
uloop: fix event timeouts on darwin
Diffstat (limited to 'uloop.c')
-rw-r--r--uloop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uloop.c b/uloop.c
index c2a7b3e..f60eb41 100644
--- a/uloop.c
+++ b/uloop.c
@@ -121,7 +121,7 @@ static void uloop_run_events(int timeout)
if (timeout > 0) {
ts.tv_sec = timeout / 1000;
- ts.tv_nsec = timeout * 1000000;
+ ts.tv_nsec = (timeout % 1000) * 1000000;
}
nfds = kevent(poll_fd, NULL, 0, events, ARRAY_SIZE(events), timeout > 0 ? &ts : NULL);