[MEDIUM] poll: add a measurement of idle vs work time
We now measure the work and idle times in order to report the idle
time in the stats. It's expected that we'll be able to use it at
other places later.
diff --git a/src/ev_epoll.c b/src/ev_epoll.c
index 958c4e6..bc7493b 100644
--- a/src/ev_epoll.c
+++ b/src/ev_epoll.c
@@ -236,8 +236,10 @@
}
fd = MIN(maxfd, global.tune.maxpollevents);
+ gettimeofday(&before_poll, NULL);
status = epoll_wait(epoll_fd, epoll_events, fd, wait_time);
tv_update_date(wait_time, status);
+ measure_idle();
for (count = 0; count < status; count++) {
fd = epoll_events[count].data.fd;