X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=iolog.c;h=45a95aa410e3fc11c4a8c6c6f6f8b2cca69dba4a;hp=31d674c24dab7dc607bd7c43b120f524e7ae5ab9;hb=8b6a404cdd2c40715885e562416c3db039912773;hpb=29ac257cb18a38c20f970bd02f2bfb3a027309d5 diff --git a/iolog.c b/iolog.c index 31d674c2..45a95aa4 100644 --- a/iolog.c +++ b/iolog.c @@ -19,6 +19,7 @@ #include "trim.h" #include "filelock.h" #include "smalloc.h" +#include "blktrace.h" static int iolog_flush(struct io_log *log); @@ -64,7 +65,7 @@ static void iolog_delay(struct thread_data *td, unsigned long delay) { uint64_t usec = utime_since_now(&td->last_issue); uint64_t this_delay; - struct timeval tv; + struct timespec ts; if (delay < td->time_offset) { td->time_offset = 0; @@ -77,7 +78,7 @@ static void iolog_delay(struct thread_data *td, unsigned long delay) delay -= usec; - fio_gettime(&tv, NULL); + fio_gettime(&ts, NULL); while (delay && !td->terminate) { this_delay = delay; if (this_delay > 500000) @@ -87,7 +88,7 @@ static void iolog_delay(struct thread_data *td, unsigned long delay) delay -= this_delay; } - usec = utime_since_now(&tv); + usec = utime_since_now(&ts); if (usec > delay) td->time_offset = usec - delay; else