Skip to content

Commit c68b27d

Browse files
author
Frank Hartmann
committed
linux: avoid using CLOCK_SGI_CYCLE, use METHOD
1 parent 8fdc7b7 commit c68b27d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/cycle.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ INLINE_ELAPSED(__inline)
438438
#endif
439439
/*----------------------------------------------------------------*/
440440
/* SGI/Irix/Linux but not android */
441-
#if !defined(__ANDROID__)
442-
#if defined(HAVE_CLOCK_GETTIME) && !defined(HAVE_TICK_COUNTER)
441+
#if !defined(__ANDROID__) && !defined(HAVE_TICK_COUNTER)
442+
#if defined(HAVE_CLOCK_GETTIME)
443443
#if defined(CLOCK_MONOTONIC)
444444
#define METHOD CLOCK_MONOTONIC
445445
#elif defined(CLOCK_REALTIME)
@@ -454,7 +454,7 @@ typedef struct timespec ticks;
454454
static inline ticks getticks(void)
455455
{
456456
struct timespec t;
457-
clock_gettime(CLOCK_SGI_CYCLE, &t);
457+
clock_gettime(METHOD, &t);
458458
return t;
459459
}
460460

0 commit comments

Comments
 (0)