Index: base/time/time_posix.cc |
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc |
index 4aadee618a0fb3a452edf945ab4b7e9fc3ac8a14..22e304320f8ae4510a56bb05d27cc8b232c220f9 100644 |
--- a/base/time/time_posix.cc |
+++ b/base/time/time_posix.cc |
@@ -93,6 +93,9 @@ int64_t ConvertTimespecToMicros(const struct timespec& ts) { |
#if (defined(OS_POSIX) && \ |
defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0) || \ |
defined(OS_BSD) || defined(OS_ANDROID) |
+ |
+const char* kLinuxMonotonicClockId = "LINUX_CLOCK_MONOTONIC_MICROS"; |
+ |
int64_t ClockNow(clockid_t clk_id) { |
struct timespec ts; |
if (clock_gettime(clk_id, &ts) != 0) { |
@@ -312,6 +315,11 @@ TimeTicks TimeTicks::Now() { |
} |
// static |
+std::string TimeTicks::ClockId() { |
+ return kLinuxMonotonicClockId; |
+} |
+ |
+// static |
bool TimeTicks::IsHighResolution() { |
return true; |
} |