… | |
… | |
325 | |
325 | |
326 | typedef ev_watcher *W; |
326 | typedef ev_watcher *W; |
327 | typedef ev_watcher_list *WL; |
327 | typedef ev_watcher_list *WL; |
328 | typedef ev_watcher_time *WT; |
328 | typedef ev_watcher_time *WT; |
329 | |
329 | |
|
|
330 | #define ev_active(w) ((W)(w))->active |
330 | #define ev_at(w) ((WT)(w))->at |
331 | #define ev_at(w) ((WT)(w))->at |
331 | |
332 | |
332 | #if EV_USE_MONOTONIC |
333 | #if EV_USE_MONOTONIC |
333 | /* sig_atomic_t is used to avoid per-thread variables or locking but still */ |
334 | /* sig_atomic_t is used to avoid per-thread variables or locking but still */ |
334 | /* giving it a reasonably high chance of working on typical architetcures */ |
335 | /* giving it a reasonably high chance of working on typical architetcures */ |
… | |
… | |
1938 | else |
1939 | else |
1939 | ev_timer_stop (EV_A_ w); |
1940 | ev_timer_stop (EV_A_ w); |
1940 | } |
1941 | } |
1941 | else if (w->repeat) |
1942 | else if (w->repeat) |
1942 | { |
1943 | { |
1943 | w->at = w->repeat; |
1944 | ev_at (w) = w->repeat; |
1944 | ev_timer_start (EV_A_ w); |
1945 | ev_timer_start (EV_A_ w); |
1945 | } |
1946 | } |
1946 | } |
1947 | } |
1947 | |
1948 | |
1948 | #if EV_PERIODIC_ENABLE |
1949 | #if EV_PERIODIC_ENABLE |