Rewrite the comment, use maxResolutionMs

This commit is contained in:
janekptacijarabaci 2018-03-02 07:27:21 +01:00 committed by Roy Tam
commit bbacda5da1

View file

@ -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