uloop: fix event timeouts on darwin

This commit is contained in:
Felix Fietkau 2011-02-12 21:33:32 +01:00
parent 83037e345d
commit 9abfbad95f

View file

@ -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);