From c3fe91d4c597da17e1eb9e75d36176465f44060a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Wed, 5 Dec 2012 09:41:24 +0000 Subject: [PATCH] os: Use CLOCK_MONOTONIC --- common/os_time.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.43.0