… | |
… | |
150 | timeout = 0.; |
150 | timeout = 0.; |
151 | |
151 | |
152 | /* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */ |
152 | /* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */ |
153 | /* the default libev max wait time, however. */ |
153 | /* the default libev max wait time, however. */ |
154 | EV_RELEASE_CB; |
154 | EV_RELEASE_CB; |
155 | eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3); |
155 | eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, timeout * 1e3 + 0.9999); |
156 | EV_ACQUIRE_CB; |
156 | EV_ACQUIRE_CB; |
157 | |
157 | |
158 | if (ecb_expect_false (eventcnt < 0)) |
158 | if (ecb_expect_false (eventcnt < 0)) |
159 | { |
159 | { |
160 | if (errno != EINTR) |
160 | if (errno != EINTR) |