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

Unified Diff: base/time.h

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 9 years, 4 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 | « no previous file | chrome/browser/net/load_timing_observer.cc » ('j') | content/common/resource_messages.h » ('J')
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 aa97f0ab4f422c807247e5c226b565fff21ac6c8..8582ba8529fa24185e9091c1cd7a000a2c1135c9 100644
--- a/base/time.h
+++ b/base/time.h
@@ -464,7 +464,8 @@ class BASE_EXPORT TimeTicks {
// Platform-dependent tick count representing "right now."
// The resolution of this clock is ~1-15ms. Resolution varies depending
- // on hardware/operating system configuration.
+ // on hardware/operating system configuration. The value should be the same
+ // across processes.
wtc 2011/08/29 21:59:41 Nit: this comment is a little unclear. You can pe
static TimeTicks Now();
// Returns a platform-dependent high-resolution tick count. Implementation
@@ -492,6 +493,14 @@ class BASE_EXPORT TimeTicks {
return ticks_;
}
+ // Converts an integer value representing TimeTicks to a class. This is used
+ // when deserializing a |TimeTicks| structure, using a value that originated
+ // from |TimeTicks::ToInternalValue()|. It is not provided as a constructor
+ // because the integer type may be unclear from the perspective of a caller.
+ static TimeTicks FromInternalValue(int64 ticks) {
+ return TimeTicks(ticks);
+ }
+
TimeTicks& operator=(TimeTicks other) {
ticks_ = other.ticks_;
return *this;
« no previous file with comments | « no previous file | chrome/browser/net/load_timing_observer.cc » ('j') | content/common/resource_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698