Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 1 year ago
parent
commit
2114cc0f41
3 changed files with 4 additions and 4 deletions
  1. +2
    -2
      ev.c
  2. +1
    -1
      ev_epoll.c
  3. +1
    -1
      ev_poll.c

+ 2
- 2
ev.c View File

@ -546,7 +546,7 @@ struct signalfd_siginfo
: 0 < (time_t)4294967295 ? 4294967295. \
: 2147483647.) \
#define EV_TS_TO_MS(a) a * 1e3 + 0.9999
#define EV_TS_TO_MSEC(a) a * 1e3 + 0.9999
#define EV_TS_FROM_USEC(us) us * 1e-6
#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; ts.tv_nsec = (long)((t - ts.tv_sec) * 1e9); } while (0)
@ -2045,7 +2045,7 @@ ev_sleep (ev_tstamp delay) EV_NOEXCEPT
#elif defined _WIN32
/* maybe this should round up, as ms is very low resolution */
/* compared to select (µs) or nanosleep (ns) */
Sleep ((unsigned long)(EV_TS_TO_MS (delay)));
Sleep ((unsigned long)(EV_TS_TO_MSEC (delay)));
#else
struct timeval tv;


+ 1
- 1
ev_epoll.c View File

@ -152,7 +152,7 @@ epoll_poll (EV_P_ ev_tstamp timeout)
/* epoll wait times cannot be larger than (LONG_MAX - 999UL) / HZ msecs, which is below */
/* the default libev max wait time, however. */
EV_RELEASE_CB;
eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, EV_TS_TO_MS (timeout));
eventcnt = epoll_wait (backend_fd, epoll_events, epoll_eventmax, EV_TS_TO_MSEC (timeout));
EV_ACQUIRE_CB;
if (ecb_expect_false (eventcnt < 0))


+ 1
- 1
ev_poll.c View File

@ -95,7 +95,7 @@ poll_poll (EV_P_ ev_tstamp timeout)
int res;
EV_RELEASE_CB;
res = poll (polls, pollcnt, EV_TS_TO_MS (timeout));
res = poll (polls, pollcnt, EV_TS_TO_MSEC (timeout));
EV_ACQUIRE_CB;
if (ecb_expect_false (res < 0))


Loading…
Cancel
Save