X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Ffilecreate.c;h=00562c861c2be580083f60032dfc368914c8e6f3;hb=b47b45887dcd4c9bd7d0391a393809ef892a34ff;hp=01f7d68f4073e0fe41131fd5652e5604b5161b21;hpb=132b1ee42e63a5ca369d94d33d2a7337741d7458;p=fio.git diff --git a/engines/filecreate.c b/engines/filecreate.c index 01f7d68f..00562c86 100644 --- a/engines/filecreate.c +++ b/engines/filecreate.c @@ -14,7 +14,7 @@ static int open_file(struct thread_data *td, struct fio_file *f) { - struct timespec start, end; + struct timespec start; int do_lat = !td->o.disable_lat; dprint(FD_FILE, "fd open %s\n", f->file_name); @@ -43,11 +43,10 @@ static int open_file(struct thread_data *td, struct fio_file *f) } if (do_lat) { - unsigned long long nsec; + uint64_t nsec; - fio_gettime(&end, NULL); - nsec = ntime_since(&start, &end); - add_lat_sample(td, DDIR_WRITE, nsec, 0, 0); + nsec = ntime_since_now(&start); + add_clat_sample(td, DDIR_READ, nsec, 0, 0); } return 0;