diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-09-01 15:22:56 +0200 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-09-02 23:13:01 +0200 |
commit | 7895739cfec05b5edb9eff8c8673803fcdf9ed75 (patch) | |
tree | 60429921eb0adfbb77a1453336606a542be4648b /configure.ac | |
parent | a683aa8c7266e7851ca571b8705476268b8e9314 (diff) |
Use clock_gettime() instead of gettimeofday()
This avoids problems with system clock changes (though there are some
safeguards in place to avoid waiting too long on clock changes).
Thanks to John Sullivan for pointing this out.
We can't easily use CLOCK_MONOTONIC_RAW or CLOCK_MONOTONIC_COARSE even
on platforms that define the clock because we can get runtime errors.
CLOCK_MONOTONIC seems to work on all tested platforms that provide it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1dd2419..56d02ae 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,7 @@ AC_CHECK_FUNCS([strcasecmp strncasecmp strchr strcspn strspn strtol strtoul strt AC_CHECK_FUNCS([malloc realloc atexit]) AC_FUNC_FORK AC_CHECK_FUNCS(__assert_fail) +AC_SEARCH_LIBS(clock_gettime, rt) # checks for types AC_TYPE_MODE_T |