diff options
author | Bart Van Assche <bvanassche@acm.org> | 2020-09-20 11:40:26 -0700 |
---|---|---|
committer | Bart Van Assche <bvanassche@acm.org> | 2020-09-20 16:09:30 -0700 |
commit | 69212fc41c0420f8caf272a0cc270194edbddfe7 (patch) | |
tree | 9eae986cb31d5b8ddce70297178b85dafe305da4 /configure | |
parent | 187f39063e1b0a7baeda20a9f4f2406327ec0d41 (diff) | |
download | fio-69212fc41c0420f8caf272a0cc270194edbddfe7.tar.gz fio-69212fc41c0420f8caf272a0cc270194edbddfe7.tar.bz2 |
gettime: Introduce fio_get_mono_time()
Introduce a new function for querying the monotonic clock, something that
is necessary in every context where relative time is measured and where
wall clock time jumps should have no effect. Remove fill_clock_gettime()
since the only contexts where CLOCK_MONOTONIC_RAW are used are
get_cycles_per_msec() and --clocksource=clock_gettime. I think both contexts
should use CLOCK_MONOTONIC instead of its raw variant such that the values
read from the clock are frequency adjusted (a computer clock crystal can
deviate up to 500 ppm from its nominal frequency).
This patch improves accuracy of the helper_thread code on Darwin. Darwin
supports CLOCK_MONOTONIC but not pthread_condattr_setclock(). In other
words, this patch causes the helper thread code to switch from the
real-time clock to the monotonic clock on Darwin.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 0 insertions, 20 deletions
@@ -1105,26 +1105,6 @@ fi print_config "CLOCK_MONOTONIC" "$clock_monotonic" ########################################## -# CLOCK_MONOTONIC_RAW probe -if test "$clock_monotonic_raw" != "yes" ; then - clock_monotonic_raw="no" -fi -if test "$clock_gettime" = "yes" ; then - cat > $TMPC << EOF -#include <stdio.h> -#include <time.h> -int main(int argc, char **argv) -{ - return clock_gettime(CLOCK_MONOTONIC_RAW, NULL); -} -EOF - if compile_prog "" "$LIBS" "clock monotonic"; then - clock_monotonic_raw="yes" - fi -fi -print_config "CLOCK_MONOTONIC_RAW" "$clock_monotonic_raw" - -########################################## # clockid_t probe if test "$clockid_t" != "yes" ; then clockid_t="no" |