… | |
… | |
90 | { |
90 | { |
91 | struct pollfd *p; |
91 | struct pollfd *p; |
92 | int res; |
92 | int res; |
93 | |
93 | |
94 | EV_RELEASE_CB; |
94 | EV_RELEASE_CB; |
95 | res = poll (polls, pollcnt, ev_timeout_to_ms (timeout)); |
95 | res = poll (polls, pollcnt, timeout * 1e3); |
96 | EV_ACQUIRE_CB; |
96 | EV_ACQUIRE_CB; |
97 | |
97 | |
98 | if (expect_false (res < 0)) |
98 | if (expect_false (res < 0)) |
99 | { |
99 | { |
100 | if (errno == EBADF) |
100 | if (errno == EBADF) |
… | |
… | |
127 | } |
127 | } |
128 | |
128 | |
129 | int inline_size |
129 | int inline_size |
130 | poll_init (EV_P_ int flags) |
130 | poll_init (EV_P_ int flags) |
131 | { |
131 | { |
132 | backend_fudge = 0.; /* posix says this is zero */ |
132 | backend_fudge = 1e-3; |
133 | backend_modify = poll_modify; |
133 | backend_modify = poll_modify; |
134 | backend_poll = poll_poll; |
134 | backend_poll = poll_poll; |
135 | |
135 | |
136 | pollidxs = 0; pollidxmax = 0; |
136 | pollidxs = 0; pollidxmax = 0; |
137 | polls = 0; pollmax = 0; pollcnt = 0; |
137 | polls = 0; pollmax = 0; pollcnt = 0; |