From c8355b22c047c9737e32f096b816edbb8b0fa181 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Fri, 2 Mar 2018 07:27:21 +0100 Subject: Rewrite the comment, use maxResolutionMs --- dom/performance/PerformanceTiming.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dom/performance/PerformanceTiming.cpp') 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 -- cgit v1.2.3