Skip to content

Commit

Permalink
test_util: fix timer_frequency() in direct compilation case
Browse files Browse the repository at this point in the history
  • Loading branch information
ebiggers committed Feb 19, 2024
1 parent 5f2a0b4 commit 513cec0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion programs/test_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ timer_frequency(void)

QueryPerformanceFrequency(&freq);
return freq.QuadPart;
#elif defined(HAVE_CLOCK_GETTIME)
#elif defined(HAVE_CLOCK_GETTIME) || \
/* fallback detection method for direct compilation */ \
(!defined(HAVE_CONFIG_H) && defined(CLOCK_MONOTONIC))
return 1000000000;
#else
return 1000000;
Expand Down

0 comments on commit 513cec0

Please sign in to comment.