… | |
… | |
86 | kqueue_eventmax = array_roundsize (struct kevent, kqueue_changecnt); |
86 | kqueue_eventmax = array_roundsize (struct kevent, kqueue_changecnt); |
87 | kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); |
87 | kqueue_events = (struct kevent *)ev_malloc (sizeof (struct kevent) * kqueue_eventmax); |
88 | } |
88 | } |
89 | |
89 | |
90 | ts.tv_sec = (time_t)timeout; |
90 | ts.tv_sec = (time_t)timeout; |
91 | ts.tv_nsec = (long)(timeout - (ev_tstamp)ts.tv_sec) * 1e9; |
91 | ts.tv_nsec = (long)((timeout - (ev_tstamp)ts.tv_sec) * 1e9); |
|
|
92 | fprintf (stderr, "to %ld:%09ld %f\n", ts.tv_sec, ts.tv_nsec, res);//D |
92 | res = kevent (kqueue_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts); |
93 | res = kevent (kqueue_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts); |
93 | kqueue_changecnt = 0; |
94 | kqueue_changecnt = 0; |
94 | |
95 | |
95 | if (res < 0) |
96 | if (res < 0) |
96 | { |
97 | { |