X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=libfio.c;h=d88ed4ed2032ecccfad5435b0de10abc42157973;hp=fb7d35ae1ae5bb646f49dc6dc791bbbb74926cbe;hb=5de1ade5a8a8dd118bdfac835a6cfb4bcf013734;hpb=c6da2c34dee76d583cd0364988e536460a895540 diff --git a/libfio.c b/libfio.c index fb7d35ae..d88ed4ed 100644 --- a/libfio.c +++ b/libfio.c @@ -134,7 +134,6 @@ void clear_io_state(struct thread_data *td, int all) void reset_all_stats(struct thread_data *td) { - struct timeval tv; int i; reset_io_counters(td, 1); @@ -148,11 +147,10 @@ void reset_all_stats(struct thread_data *td) td->rwmix_issues = 0; } - fio_gettime(&tv, NULL); - memcpy(&td->epoch, &tv, sizeof(tv)); - memcpy(&td->start, &tv, sizeof(tv)); - memcpy(&td->iops_sample_time, &tv, sizeof(tv)); - memcpy(&td->bw_sample_time, &tv, sizeof(tv)); + set_epoch_time(td, td->o.log_unix_epoch); + memcpy(&td->start, &td->epoch, sizeof(struct timeval)); + memcpy(&td->iops_sample_time, &td->epoch, sizeof(struct timeval)); + memcpy(&td->bw_sample_time, &td->epoch, sizeof(struct timeval)); lat_target_reset(td); clear_rusage_stat(td);