diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-12-23 19:07:13 -0800 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-01-06 09:29:45 +0100 |
commit | 843beb152bb948c972e573448be02ea0a902f3ea (patch) | |
tree | a626a8fc68fef04e5865e2bce91b6dedfe145a4e /lib | |
parent | 95ea5d5c0b0342ec95899c6d33311b6ff40732b3 (diff) |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |