]> git.cworth.org Git - apitrace/blobdiff - common/os_time.hpp
os: Use CLOCK_MONOTONIC
[apitrace] / 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;