Chromium Code Reviews| 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 ad653c600a557a110a2ed88b301a6fd6c0e36149..bed17a883a8353edb1bcc4fbd2b770642adcdf5f 100644 |
| --- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| +++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp |
| @@ -422,10 +422,15 @@ double PerformanceBase::clampTimeResolution(double timeSeconds) |
| return floor(timeSeconds / resolutionSeconds) * resolutionSeconds; |
| } |
| -double PerformanceBase::now() const |
| +DOMHighResTimeStamp PerformanceBase::monotonicTimeToDOMHighResTimeStamp(double monotonicTime) const |
| { |
| - 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()); // in milliseconds |
|
Rick Byers
2015/09/29 15:57:59
nit: this comment seems redundant (it's clear you'
majidvp
2015/10/01 20:57:19
Done.
|
| } |
| DEFINE_TRACE(PerformanceBase) |