summaryrefslogtreecommitdiffstats
path: root/src/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/clock.c b/src/clock.c
index ec2133c..7734389 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -135,7 +135,7 @@ uint64_t now_cpu_time_thread(int thr)
/* set the clock source for the local thread */
void clock_set_local_source(void)
{
-#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME)
+#if defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0) && defined(_POSIX_THREAD_CPUTIME) && (_POSIX_THREAD_CPUTIME >= 0)
#ifdef USE_THREAD
pthread_getcpuclockid(pthread_self(), &per_thread_clock_id[tid]);
#else