summaryrefslogtreecommitdiff
path: root/dom/performance
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-17 11:09:13 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-17 11:09:13 +0100
commite3da3bec40b001650ff4beca247623ab55432cf0 (patch)
tree3822140fdf0450d471176ae3b3b929302fb80cbc /dom/performance
parent11bdaa144d8a38ecd897dde278cb1db9b8313961 (diff)
downloaduxp-e3da3bec40b001650ff4beca247623ab55432cf0.tar.gz
Round down to the nearest 2ms (instead of 1ms)
Issue #67 https://github.com/MoonchildProductions/UXP/pull/34/commits/c8355b22c047c9737e32f096b816edbb8b0fa181 https://github.com/MoonchildProductions/UXP/commit/a32b7f7c4e4e31669e0787e6321d74e4db71e514 https://github.com/MoonchildProductions/UXP/commit/f0b727eac28244e0fa24a6107dee44e83ad0f561
Diffstat (limited to 'dom/performance')
-rwxr-xr-xdom/performance/PerformanceTiming.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/dom/performance/PerformanceTiming.cpp b/dom/performance/PerformanceTiming.cpp
index 97bbcb0ca7..5f771f0aae 100755
--- a/dom/performance/PerformanceTiming.cpp
+++ b/dom/performance/PerformanceTiming.cpp
@@ -307,12 +307,8 @@ PerformanceTiming::SecureConnectionStartHighRes()
if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
return mZeroTime;
}
-
- // Round down to the nearest 1ms
- const double maxResolutionMs = 1;
- return mSecureConnectionStart.IsNull()
- ? mZeroTime
- : floor(TimeStampToDOMHighRes(mSecureConnectionStart) / maxResolutionMs) * maxResolutionMs;
+ return mSecureConnectionStart.IsNull() ? mZeroTime
+ : TimerClamping::ReduceMsTimeValue(TimeStampToDOMHighRes(mSecureConnectionStart));
}
DOMTimeMilliSec