helper_thread: cleanups
[fio.git] / helper_thread.c
index 7874985504be2aa6c4c82c7683320c39409d927d..90bfab5c0ce978039a289c145f248a31d6289652 100644 (file)
@@ -164,13 +164,11 @@ static void *helper_thread_main(void *data)
        while (!ret && !hd->exit) {
                uint64_t since_du, since_ss = 0;
                struct timeval timeout = {
-                       .tv_sec  = DISK_UTIL_MSEC / 1000,
-                       .tv_usec = (DISK_UTIL_MSEC % 1000) * 1000,
+                       .tv_sec  = msec_to_next_event / 1000,
+                       .tv_usec = (msec_to_next_event % 1000) * 1000,
                };
                fd_set rfds, efds;
 
-               timespec_add_msec(&ts, msec_to_next_event);
-
                if (read_from_pipe(hd->pipe[0], &action, sizeof(action)) < 0) {
                        FD_ZERO(&rfds);
                        FD_SET(hd->pipe[0], &rfds);