]> git.cworth.org Git - apitrace/commitdiff
os: Use CLOCK_MONOTONIC
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 5 Dec 2012 09:41:24 +0000 (09:41 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 5 Dec 2012 09:41:24 +0000 (09:41 +0000)
common/os_time.hpp

index 13cc733ae05488312b4fb5554d08fcb8fd49bc2d..3e4960e74554d0179c96b4582202d52390c61378 100644 (file)
@@ -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;