diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-02 07:27:21 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-02 07:27:21 +0100 |
commit | c8355b22c047c9737e32f096b816edbb8b0fa181 (patch) | |
tree | fc5f7a387861162cec25b917abbfc0af351a5e6a | |
parent | d7d79119ec267ad8bed18b28f9ba0f96f3b6cc16 (diff) | |
download | UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.gz UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.lz UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.xz UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.zip |
Rewrite the comment, use maxResolutionMs
-rw-r--r-- | dom/performance/PerformanceTiming.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp index 32ddea823..4070b6a0f 100644 --- a/dom/performance/PerformanceTiming.cpp +++ b/dom/performance/PerformanceTiming.cpp @@ -307,10 +307,12 @@ PerformanceTiming::SecureConnectionStartHighRes() if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { return mZeroTime; } - // Rounding to 1ms + + // Round down to the nearest 1ms + const double maxResolutionMs = 1; return mSecureConnectionStart.IsNull() ? mZeroTime - : floor(TimeStampToDOMHighRes(mSecureConnectionStart) / 1) * 1; + : floor(TimeStampToDOMHighRes(mSecureConnectionStart) / maxResolutionMs) * maxResolutionMs; } DOMTimeMilliSec |