From 628f53967c93d6251494a47a1a48038e71990d7f Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Thu, 1 Mar 2018 21:17:42 +0100 Subject: [PATCH] Rounding to 1ms --- dom/performance/PerformanceTiming.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp index 4428f81c2b..32ddea823a 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