Index: third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
index abe2d9fd2a4ed68419a3294d2b5404aa33174ed8..7af6fcad01b906b9d4412b0ecfbaee0abb49a0f0 100644 |
--- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
+++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
@@ -422,14 +422,19 @@ double PerformanceBase::clampTimeResolution(double timeSeconds) |
return floor(timeSeconds / resolutionSeconds) * resolutionSeconds; |
} |
-double PerformanceBase::now() const |
+DOMHighResTimeStamp PerformanceBase::monotonicTimeToDOMHighResTimeStamp(double monotonicTime) const |
{ |
// Avoid exposing raw platform timestamps. |
if (m_timeOrigin == 0.0) |
return 0.0; |
- double nowSeconds = monotonicallyIncreasingTime() - m_timeOrigin; |
- return 1000.0 * clampTimeResolution(nowSeconds); |
+ double timeInSeconds = monotonicTime - m_timeOrigin; |
+ return convertSecondsToDOMHighResTimeStamp(clampTimeResolution(timeInSeconds)); |
+} |
+ |
+DOMHighResTimeStamp PerformanceBase::now() const |
+{ |
+ return monotonicTimeToDOMHighResTimeStamp(monotonicallyIncreasingTime()); |
} |
DEFINE_TRACE(PerformanceBase) |