Chromium Code Reviews| 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; |