Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW

Solaris has not yet adopted this Linux extension

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 2012-08-24 14:02:01 -07:00 committed by Daniel Vetter
parent e40146878e
commit 99fdba921e

View File

@ -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);