diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 352620d0a3..9e7050c730 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -230,7 +230,7 @@ static void _do_poll(struct poller *p, int exp, int wake) int timeout = (global.tune.options & GTUNE_BUSY_POLLING) ? 0 : wait_time; status = epoll_wait(epoll_fd[tid], epoll_events, global.tune.maxpollevents, timeout); - clock_update_local_date(timeout, status); + clock_update_local_date(wait_time, (global.tune.options & GTUNE_BUSY_POLLING) ? 1 : status); if (status) { activity[tid].poll_io++; diff --git a/src/ev_evports.c b/src/ev_evports.c index ee357bc1f4..da2c11060d 100644 --- a/src/ev_evports.c +++ b/src/ev_evports.c @@ -225,7 +225,7 @@ static void _do_poll(struct poller *p, int exp, int wake) break; } } - clock_update_local_date(timeout, nevlist); + clock_update_local_date(wait_time, (global.tune.options & GTUNE_BUSY_POLLING) ? 1 : nevlist); if (nevlist || interrupted) break; diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index f123e7be25..271e95b672 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -183,7 +183,7 @@ static void _do_poll(struct poller *p, int exp, int wake) kev, // struct kevent *eventlist fd, // int nevents &timeout_ts); // const struct timespec *timeout - clock_update_local_date(timeout, status); + clock_update_local_date(wait_time, (global.tune.options & GTUNE_BUSY_POLLING) ? 1 : status); if (status) { activity[tid].poll_io++;