aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liberty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/liberty.c b/liberty.c
index c3051d8..1c71ab1 100644
--- a/liberty.c
+++ b/liberty.c
@@ -83,7 +83,10 @@
extern char **environ;
-#ifdef _POSIX_MONOTONIC_CLOCK
+#ifdef CLOCK_MONOTONIC_RAW
+// This should be more accurate for shorter intervals
+#define CLOCK_BEST CLOCK_MONOTONIC_RAW
+#elif defined _POSIX_MONOTONIC_CLOCK
#define CLOCK_BEST CLOCK_MONOTONIC
#else // ! _POSIX_MONOTIC_CLOCK
#define CLOCK_BEST CLOCK_REALTIME