summaryrefslogtreecommitdiffstats
path: root/dom
diff options
context:
space:
mode:
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