Using monotonic clock rather than CPU clock

This commit is contained in:
Matt Hill
2014-09-24 22:34:19 -04:00
parent d2bf82a152
commit c3b2c89f93

View File

@@ -116,7 +116,7 @@ void getTime(timespec* time)
time->tv_sec = mts.tv_sec;
time->tv_nsec = mts.tv_nsec;
#else
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, time);
clock_gettime(CLOCK_MONOTONIC, time);
#endif
}