| Index: third_party/WebKit/Source/wtf/Time.h
|
| diff --git a/third_party/WebKit/Source/wtf/Time.h b/third_party/WebKit/Source/wtf/Time.h
|
| index 3bc5ae8c821e69001416ab360655be998ccc36fd..e55ebf2375eb7039c29824415ea938a5d7e59c5a 100644
|
| --- a/third_party/WebKit/Source/wtf/Time.h
|
| +++ b/third_party/WebKit/Source/wtf/Time.h
|
| @@ -43,6 +43,17 @@ class TimeWrapper {
|
| return m_value.ToInternalValue();
|
| }
|
|
|
| + // 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.
|
| + double InSeconds() const {
|
| + return (m_value - WrappedTimeType()).InSecondsF();
|
| + }
|
| +
|
| + static TimeWrapper FromSeconds(double seconds) {
|
| + return WrappedTimeType() + TimeDelta::FromSecondsD(seconds);
|
| + }
|
| +
|
| TimeWrapper& operator=(TimeWrapper other) {
|
| m_value = other.m_value;
|
| return *this;
|
|
|