From d7d79119ec267ad8bed18b28f9ba0f96f3b6cc16 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 1 Mar 2018 21:17:42 +0100 Subject: Rounding to 1ms --- dom/performance/PerformanceTiming.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dom') diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp index 4428f81c2..32ddea823 100644 --- a/dom/performance/PerformanceTiming.cpp +++ b/dom/performance/PerformanceTiming.cpp @@ -307,8 +307,10 @@ PerformanceTiming::SecureConnectionStartHighRes() if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { return mZeroTime; } - return mSecureConnectionStart.IsNull() ? mZeroTime - : TimeStampToDOMHighRes(mSecureConnectionStart); + // Rounding to 1ms + return mSecureConnectionStart.IsNull() + ? mZeroTime + : floor(TimeStampToDOMHighRes(mSecureConnectionStart) / 1) * 1; } DOMTimeMilliSec -- cgit v1.2.3