From: José Fonseca Date: Wed, 5 Dec 2012 09:41:24 +0000 (+0000) Subject: os: Use CLOCK_MONOTONIC X-Git-Url: https://git.cworth.org/git?p=apitrace;a=commitdiff_plain;h=c3fe91d4c597da17e1eb9e75d36176465f44060a os: Use CLOCK_MONOTONIC --- diff --git a/common/os_time.hpp b/common/os_time.hpp index 13cc733..3e4960e 100644 --- a/common/os_time.hpp +++ b/common/os_time.hpp @@ -73,7 +73,7 @@ namespace os { return counter.QuadPart; #elif defined(__linux__) struct timespec tp; - if (clock_gettime(CLOCK_REALTIME, &tp) == -1) { + if (clock_gettime(CLOCK_MONOTONIC, &tp) == -1) { return 0; } return tp.tv_sec * 1000000000LL + tp.tv_nsec;