Index: base/time.h |
diff --git a/base/time.h b/base/time.h |
index aa97f0ab4f422c807247e5c226b565fff21ac6c8..b480487cbab47cf90653d9f01531e29874c207dd 100644 |
--- a/base/time.h |
+++ b/base/time.h |
@@ -492,6 +492,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; |