diff options
author | root <root> | 2010-10-15 22:48:25 +0000 |
---|---|---|
committer | root <root> | 2010-10-15 22:48:25 +0000 |
commit | 01b7a3812990c57fd03cb7a1cc58cd4a70a25e0e (patch) | |
tree | f7f1663a69eaa6214e396df3ec5d1e3977cc64b8 | |
parent | fdc074f34b5284968cb4174e9c5d2bc253d70d4c (diff) |
sigh
-rw-r--r-- | ev.c | 6 | ||||
-rw-r--r-- | ev_kqueue.c | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -472,7 +472,7 @@ struct signalfd_siginfo #define MAX_BLOCKTIME 59.743 /* never wait longer than this time (to detect time jumps) */ #define EV_TV_SET(tv,t) do { tv.tv_sec = (long)t; tv.tv_usec = (long)((t - tv.tv_sec) * 1e6); } while (0) -#define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; tv.tv_nsec = (long)((t - tv.tv_sec) * 1e9); } while (0) +#define EV_TS_SET(ts,t) do { ts.tv_sec = (long)t; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0) #if __GNUC__ >= 4 # define expect(expr,value) __builtin_expect ((expr),(value)) @@ -773,7 +773,7 @@ ev_sleep (ev_tstamp delay) #if EV_USE_NANOSLEEP struct timespec ts; - EV_SET_TS (ts, delay); + EV_TS_SET (ts, delay); nanosleep (&ts, 0); #elif defined(_WIN32) Sleep ((unsigned long)(delay * 1e3)); @@ -783,7 +783,7 @@ ev_sleep (ev_tstamp delay) /* here we rely on sys/time.h + sys/types.h + unistd.h providing select */ /* something not guaranteed by newer posix versions, but guaranteed */ /* by older ones */ - EV_SET_TV (tv, delay); + EV_TS_SET (tv, delay); select (0, 0, 0, 0, &tv); #endif } diff --git a/ev_kqueue.c b/ev_kqueue.c index ab6000e..0d809f5 100644 --- a/ev_kqueue.c +++ b/ev_kqueue.c @@ -97,7 +97,7 @@ kqueue_poll (EV_P_ ev_tstamp timeout) } EV_RELEASE_CB; - EV_SET_TV (tv, timeout); + EV_TS_SET (ts, timeout); res = kevent (backend_fd, kqueue_changes, kqueue_changecnt, kqueue_events, kqueue_eventmax, &ts); EV_ACQUIRE_CB; kqueue_changecnt = 0; |