use CLOCK_REALTIME_COARSE if available.

This commit is contained in:
Nikos Mavrogiannopoulos
2013-11-09 09:26:26 +01:00
parent 7410bc6596
commit 31b08654a5

View File

@@ -31,7 +31,9 @@
inline static void inline static void
gettime (struct timespec *t) gettime (struct timespec *t)
{ {
#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME) #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME_COARSE)
clock_gettime (CLOCK_REALTIME_COARSE, t);
#elif defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_REALTIME)
clock_gettime (CLOCK_REALTIME, t); clock_gettime (CLOCK_REALTIME, t);
#else #else
struct timeval tv; struct timeval tv;