[PATCH:intel-gpu-tools 1/4] Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW

Alan Coopersmith alan.coopersmith at oracle.com
Fri Aug 24 14:02:01 PDT 2012


Solaris has not yet adopted this Linux extension

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 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 bbe98c0..c321d36 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);
-- 
1.7.9.2



More information about the xorg-devel mailing list