From 843beb152bb948c972e573448be02ea0a902f3ea Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 23 Dec 2014 19:07:13 -0800 Subject: [PATCH] Don't try to use CLOCK_MONOTONIC_COARSE on OS'es that don't support it Signed-off-by: Alan Coopersmith Signed-off-by: Daniel Vetter --- lib/igt_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/igt_core.c b/lib/igt_core.c index 0d0e80cf..a74fe092 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -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); }