uloop: fix event timeouts on darwin
This commit is contained in:
parent
83037e345d
commit
9abfbad95f
1 changed files with 1 additions and 1 deletions
2
uloop.c
2
uloop.c
|
@ -121,7 +121,7 @@ static void uloop_run_events(int timeout)
|
||||||
|
|
||||||
if (timeout > 0) {
|
if (timeout > 0) {
|
||||||
ts.tv_sec = timeout / 1000;
|
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);
|
nfds = kevent(poll_fd, NULL, 0, events, ARRAY_SIZE(events), timeout > 0 ? &ts : NULL);
|
||||||
|
|
Loading…
Reference in a new issue