Index: source/lib/timer.cpp =================================================================== --- source/lib/timer.cpp +++ source/lib/timer.cpp @@ -79,7 +79,7 @@ #if OS_WIN ENSURE(QueryPerformanceCounter(&start)); #elif HAVE_CLOCK_GETTIME - (void)clock_gettime(CLOCK_REALTIME, &start); + (void)clock_gettime(CLOCK_MONOTONIC, &start); #elif HAVE_GETTIMEOFDAY gettimeofday(&start, 0); #endif @@ -110,7 +110,7 @@ #elif HAVE_CLOCK_GETTIME ENSURE(start.tv_sec || start.tv_nsec); // must have called timer_LatchStartTime first struct timespec cur; - (void)clock_gettime(CLOCK_REALTIME, &cur); + (void)clock_gettime(CLOCK_MONOTONIC, &cur); t = (cur.tv_sec - start.tv_sec) + (cur.tv_nsec - start.tv_nsec)*1e-9; #elif HAVE_GETTIMEOFDAY ENSURE(start.tv_sec || start.tv_usec); // must have called timer_LatchStartTime first @@ -134,7 +134,7 @@ resolution = 1.0 / static_cast(frequency.QuadPart); #elif HAVE_CLOCK_GETTIME struct timespec ts; - if(clock_getres(CLOCK_REALTIME, &ts) == 0) + if(clock_getres(CLOCK_MONOTONIC, &ts) == 0) resolution = ts.tv_nsec * 1e-9; #else const double t0 = timer_Time();