diff --git a/backend.c b/backend.c index 35f522e597..45d18107ca 100644 --- a/backend.c +++ b/backend.c @@ -1155,6 +1155,9 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done) unsigned int i; int ret = 0; uint64_t total_bytes, bytes_issued = 0; + struct timespec comp_time; + + fio_gettime(&comp_time, NULL); for (i = 0; i < DDIR_RWDIR_CNT; i++) bytes_done[i] = td->bytes_done[i]; @@ -1197,7 +1200,6 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done) while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) || (!flist_empty(&td->trim_list)) || !io_issue_bytes_exceeded(td) || td->o.time_based) { - struct timespec comp_time; struct io_u *io_u; int full; enum fio_ddir ddir;