From c68b27dedad182b0b222502d98cc9795787c2607 Mon Sep 17 00:00:00 2001 From: Frank Hartmann Date: Sun, 14 Jan 2018 16:52:30 +0100 Subject: [PATCH] linux: avoid using CLOCK_SGI_CYCLE, use METHOD --- kernel/cycle.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/cycle.h b/kernel/cycle.h index 21d206e35..777d1cda5 100644 --- a/kernel/cycle.h +++ b/kernel/cycle.h @@ -438,8 +438,8 @@ INLINE_ELAPSED(__inline) #endif /*----------------------------------------------------------------*/ /* SGI/Irix/Linux but not android */ -#if !defined(__ANDROID__) -#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER) +#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER) +#if defined(HAVE_CLOCK_GETTIME) #if defined(CLOCK_MONOTONIC) #define METHOD CLOCK_MONOTONIC #elif defined(CLOCK_REALTIME) @@ -454,7 +454,7 @@ typedef struct timespec ticks; static inline ticks getticks(void) { struct timespec t; - clock_gettime(CLOCK_SGI_CYCLE, &t); + clock_gettime(METHOD, &t); return t; }