Optimize fio_gettime_offload()
authorBart Van Assche <bvanassche@acm.org>
Sun, 21 Jun 2020 21:31:08 +0000 (14:31 -0700)
committerBart Van Assche <bvanassche@acm.org>
Mon, 22 Jun 2020 02:47:25 +0000 (19:47 -0700)
commit817a1d8301824effbf9ea3352e6e722a3515473c
treeb8f7fca0d2de3895e9a7eea908520eab62bfeee5
parent5fa0c063c6fe405200ec97e8f3703446dd8d82bc
Optimize fio_gettime_offload()

This patch not only an optimization but also a bug fix because it guarantees
that fio_gettime_offload() never returns an inconsistent timestamp, something
that could happen before. In this context inconsistent means returning the
.tv_sec value from one gettimeofday() call and the .tv_usec value from another
gettimeofday() call.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
gettime-thread.c
gettime.h
t/debug.c