Chromium Code Reviews| Index: third_party/WebKit/Source/platform/wtf/Time.h |
| diff --git a/third_party/WebKit/Source/platform/wtf/Time.h b/third_party/WebKit/Source/platform/wtf/Time.h |
| index 357004c8b242e50bdd4929a21a00ff7124dfc155..3c8c9035da319b2105c8c53b4c7790f733bc9b73 100644 |
| --- a/third_party/WebKit/Source/platform/wtf/Time.h |
| +++ b/third_party/WebKit/Source/platform/wtf/Time.h |
| @@ -40,6 +40,8 @@ class TimeWrapper { |
| int64_t ToInternalValueForTesting() const { return value_.ToInternalValue(); } |
| + time_t ToDoubleT() const { return value_.ToDoubleT(); } |
|
Yuta Kitamura
2017/06/09 06:26:03
WTF::Time is now an alias of base::Time (see line
kristipark
2017/06/09 17:37:13
You are correct, thanks for pointing that out. Rem
|
| + |
| // Only use this conversion when interfacing with legacy code that represents |
| // time in double. Converting to double can lead to losing information for |
| // large time values. |
| @@ -49,6 +51,10 @@ class TimeWrapper { |
| return WrappedTimeType() + TimeDelta::FromSecondsD(seconds); |
| } |
| + static TimeWrapper FromInternalValue(int64_t us) { |
| + return Time::FromInternalValue(us); |
| + } |
| + |
| TimeWrapper& operator=(TimeWrapper other) { |
| value_ = other.value_; |
| return *this; |