… | |
… | |
88 | #endif |
88 | #endif |
89 | |
89 | |
90 | /*****************************************************************************/ |
90 | /*****************************************************************************/ |
91 | |
91 | |
92 | #if EV_STAT_ENABLE |
92 | #if EV_STAT_ENABLE |
|
|
93 | # ifdef _WIN32 |
|
|
94 | # include <time.h> |
|
|
95 | # include <sys/types.h> |
|
|
96 | # endif |
93 | # include <sys/stat.h> |
97 | # include <sys/stat.h> |
94 | #endif |
98 | #endif |
95 | |
99 | |
96 | /* support multiple event loops? */ |
100 | /* support multiple event loops? */ |
97 | #if EV_MULTIPLICITY |
101 | #if EV_MULTIPLICITY |
… | |
… | |
331 | ev_prepare prepare; /* private */ |
335 | ev_prepare prepare; /* private */ |
332 | ev_check check; /* unused */ |
336 | ev_check check; /* unused */ |
333 | ev_timer timer; /* unused */ |
337 | ev_timer timer; /* unused */ |
334 | ev_periodic periodic; /* unused */ |
338 | ev_periodic periodic; /* unused */ |
335 | ev_idle idle; /* unused */ |
339 | ev_idle idle; /* unused */ |
336 | ev_fork fork; /* unused */ |
340 | ev_fork fork; /* private */ |
337 | } ev_embed; |
341 | } ev_embed; |
338 | #endif |
342 | #endif |
339 | |
343 | |
340 | #if EV_ASYNC_ENABLE |
344 | #if EV_ASYNC_ENABLE |
341 | /* invoked when somebody calls ev_async_send on the watcher */ |
345 | /* invoked when somebody calls ev_async_send on the watcher */ |
… | |
… | |
450 | void ev_loop_destroy (EV_P); |
454 | void ev_loop_destroy (EV_P); |
451 | void ev_loop_fork (EV_P); |
455 | void ev_loop_fork (EV_P); |
452 | void ev_loop_verify (EV_P); |
456 | void ev_loop_verify (EV_P); |
453 | |
457 | |
454 | ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */ |
458 | ev_tstamp ev_now (EV_P); /* time w.r.t. timers and the eventloop, updated after each poll */ |
|
|
459 | void ev_now_update (EV_P); |
455 | |
460 | |
456 | #else |
461 | #else |
457 | |
462 | |
458 | int ev_default_loop (unsigned int flags); /* returns true when successful */ |
463 | int ev_default_loop (unsigned int flags); /* returns true when successful */ |
459 | |
464 | |
… | |
… | |
508 | * should not keep ev_loop from running, unref() after starting, and ref() before stopping. |
513 | * should not keep ev_loop from running, unref() after starting, and ref() before stopping. |
509 | */ |
514 | */ |
510 | void ev_ref (EV_P); |
515 | void ev_ref (EV_P); |
511 | void ev_unref (EV_P); |
516 | void ev_unref (EV_P); |
512 | |
517 | |
513 | /* convinience function, wait for a single event, without registering an event watcher */ |
518 | /* convenience function, wait for a single event, without registering an event watcher */ |
514 | /* if timeout is < 0, do wait indefinitely */ |
519 | /* if timeout is < 0, do wait indefinitely */ |
515 | void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg); |
520 | void ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg); |
516 | #endif |
521 | #endif |
517 | |
522 | |
518 | /* these may evaluate ev multiple times, and the other arguments at most once */ |
523 | /* these may evaluate ev multiple times, and the other arguments at most once */ |