summaryrefslogtreecommitdiffstats
path: root/base/time_win.cc
diff options
context:
space:
mode:
authorsleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 20:56:43 +0000
committersleffler@chromium.org <sleffler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-01 20:56:43 +0000
commit190f13f73accbebd0e715c9f09db2f1c42b582ca (patch)
tree64cc444f1864f9a1cd1c81c6bb05940592883d88 /base/time_win.cc
parent2883287341c88da630585e227dbd94c624258cf9 (diff)
downloadchromium_src-190f13f73accbebd0e715c9f09db2f1c42b582ca.zip
chromium_src-190f13f73accbebd0e715c9f09db2f1c42b582ca.tar.gz
chromium_src-190f13f73accbebd0e715c9f09db2f1c42b582ca.tar.bz2
Add interface to system trace clock.
Add TimeTicks::NowFromSystemTraceTime to return the current system trace event clock (falling back to TimeTicks::HighResNow when not supported). On systems where the system trace clock is available this allows system and chrome events to be stamped with a common clock (eliminating post-processing time shift adjustment that can be hard). BUG=chromium-os:27809 TEST=unit tests + collect trace data on chrome os w/ kernel that supports clock_gettime(CLOCK_SYSTEM_TRACE) Change-Id: Ia6a500bd13a6f09c49052a1dd1421027960d8dea Review URL: http://codereview.chromium.org/10257020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134772 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/time_win.cc')
-rw-r--r--base/time_win.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/time_win.cc b/base/time_win.cc
index 9e6fe53..71c914d 100644
--- a/base/time_win.cc
+++ b/base/time_win.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -436,6 +436,11 @@ TimeTicks TimeTicks::HighResNow() {
}
// static
+TimeTicks TimeTicks::NowFromSystemTraceTime() {
+ return HighResNow();
+}
+
+// static
int64 TimeTicks::GetQPCDriftMicroseconds() {
return HighResNowSingleton::GetInstance()->GetQPCDriftMicroseconds();
}