Don't try to use CLOCK_MONOTONIC_COARSE on OS'es that don't support it

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Alan Coopersmith 2014-12-23 19:07:13 -08:00 committed by Daniel Vetter
parent 95ea5d5c0b
commit 843beb152b

View File

@ -267,7 +267,9 @@ static void gettime(struct timespec *ts)
{
memset(ts, 0, sizeof(*ts));
#ifdef CLOCK_MONOTONIC_COARSE
if (clock_gettime(CLOCK_MONOTONIC_COARSE, ts))
#endif
clock_gettime(CLOCK_MONOTONIC, ts);
}