Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1639)

Unified Diff: base/time.h

Issue 10257020: Add interface to system trace clock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: consolidate high res clock unit test code Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/time_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time.h
diff --git a/base/time.h b/base/time.h
index 8590e993555380faec730a17dfd7f9d93fb3450a..bd50ba4e6e03eb8a03fdfb97cf110af2a7ed60bf 100644
--- a/base/time.h
+++ b/base/time.h
@@ -482,6 +482,13 @@ class BASE_EXPORT TimeTicks {
// SHOULD ONLY BE USED WHEN IT IS REALLY NEEDED.
static TimeTicks HighResNow();
+ // Returns the current system trace time or, if none is defined, the current
+ // high-res time (i.e. HighResNow()). On systems where a global trace clock
+ // is defined, timestamping TraceEvents's with this value guarantees
+ // synchronization between events collected inside chrome and events
+ // collected outside (e.g. kernel, X server).
+ static TimeTicks NowFromSystemTraceTime();
+
#if defined(OS_WIN)
// Get the absolute value of QPC time drift. For testing.
static int64 GetQPCDriftMicroseconds();
« no previous file with comments | « base/debug/trace_event_impl.cc ('k') | base/time_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698