From 99fdba921ed88381ab721b15299e637366042465 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 24 Aug 2012 14:02:01 -0700 Subject: [PATCH] Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW Solaris has not yet adopted this Linux extension Signed-off-by: Alan Coopersmith Signed-off-by: Daniel Vetter --- tests/gem_wait_render_timeout.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c index bbe98c06..c321d36c 100644 --- a/tests/gem_wait_render_timeout.c +++ b/tests/gem_wait_render_timeout.c @@ -144,6 +144,10 @@ int main(int argc, char **argv) struct timespec start, end; long diff; +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + assert(clock_gettime(CLOCK_MONOTONIC_RAW, &start) == 0); for (i = 0; i < iter; i++) blt_color_fill(batch, dst, BUF_PAGES);