… | |
… | |
58 | |
58 | |
59 | #ifndef EV_USE_EPOLL |
59 | #ifndef EV_USE_EPOLL |
60 | # define EV_USE_EPOLL 0 |
60 | # define EV_USE_EPOLL 0 |
61 | #endif |
61 | #endif |
62 | |
62 | |
|
|
63 | #ifndef CLOCK_REALTIME |
|
|
64 | # define EV_USE_REALTIME 0 |
|
|
65 | #endif |
63 | #ifndef EV_USE_REALTIME |
66 | #ifndef EV_USE_REALTIME |
64 | # define EV_USE_REALTIME 1 /* posix requirement, but might be slower */ |
67 | # define EV_USE_REALTIME 1 /* posix requirement, but might be slower */ |
65 | #endif |
68 | #endif |
66 | |
69 | |
67 | #define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ |
70 | #define MIN_TIMEJUMP 1. /* minimum timejump that gets detected (if monotonic clock available) */ |
68 | #define MAX_BLOCKTIME 59.731 |
71 | #define MAX_BLOCKTIME 59.731 /* never wait longer than this time (to detetc time jumps) */ |
69 | #define PID_HASHSIZE 16 /* size of pid hahs table, must be power of two */ |
72 | #define PID_HASHSIZE 16 /* size of pid hash table, must be power of two */ |
|
|
73 | #define CLEANUP_INTERVAL (MAX_BLOCKTIME * 5.) /* how often to try to free memory and re-check fds */ |
70 | |
74 | |
71 | #include "ev.h" |
75 | #include "ev.h" |
72 | |
76 | |
73 | typedef struct ev_watcher *W; |
77 | typedef struct ev_watcher *W; |
74 | typedef struct ev_watcher_list *WL; |
78 | typedef struct ev_watcher_list *WL; |