We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fdc7b7 commit c68b27dCopy full SHA for c68b27d
kernel/cycle.h
@@ -438,8 +438,8 @@ INLINE_ELAPSED(__inline)
438
#endif
439
/*----------------------------------------------------------------*/
440
/* SGI/Irix/Linux but not android */
441
-#if !defined(__ANDROID__)
442
-#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
+#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER)
+#if defined(HAVE_CLOCK_GETTIME)
443
#if defined(CLOCK_MONOTONIC)
444
#define METHOD CLOCK_MONOTONIC
445
#elif defined(CLOCK_REALTIME)
@@ -454,7 +454,7 @@ typedef struct timespec ticks;
454
static inline ticks getticks(void)
455
{
456
struct timespec t;
457
- clock_gettime(CLOCK_SGI_CYCLE, &t);
+ clock_gettime(METHOD, &t);
458
return t;
459
}
460
0 commit comments