summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-02 07:27:21 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-02 07:27:21 +0100
commitc8355b22c047c9737e32f096b816edbb8b0fa181 (patch)
treefc5f7a387861162cec25b917abbfc0af351a5e6a /dom
parentd7d79119ec267ad8bed18b28f9ba0f96f3b6cc16 (diff)
downloadUXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar
UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.gz
UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.lz
UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.tar.xz
UXP-c8355b22c047c9737e32f096b816edbb8b0fa181.zip
Rewrite the comment, use maxResolutionMs
Diffstat (limited to 'dom')
-rw-r--r--dom/performance/PerformanceTiming.cpp6
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