From 33bf90331b48c7378316c141e5e9acb2862dd0ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Witold=20Kr=C4=99cicki?= <wpk@isc.org>
Date: Sun, 9 Dec 2018 00:41:21 +0100
Subject: [PATCH] use clock_gettime() instead of gettimeofday() for isc_itme
 functions

---
 lib/isc/unix/time.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c
index 9828250..c2ae60e 100644
--- a/lib/isc/unix/time.c
+++ b/lib/isc/unix/time.c
@@ -38,7 +38,11 @@
 #define NS_PER_MS	1000000		/*%< Nanoseconds per millisecond. */
 #define US_PER_S	1000000		/*%< Microseconds per second. */
 
-#define CLOCKSOURCE CLOCK_MONOTONIC
+#ifdef CLOCK_REALTIME_COARSE
+#define CLOCKSOURCE CLOCK_REALTIME_COARSE
+#else
+#define CLOCKSOURCE CLOCK_REALTIME
+#endif
 
 /*%
  *** Intervals
-- 
2.23.0

