mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Rewrite the comment, use maxResolutionMs
This commit is contained in:
parent
628f53967c
commit
bbacda5da1
1 changed files with 4 additions and 2 deletions
|
|
@ -307,10 +307,12 @@ PerformanceTiming::SecureConnectionStartHighRes()
|
||||||
if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
|
if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
|
||||||
return mZeroTime;
|
return mZeroTime;
|
||||||
}
|
}
|
||||||
// Rounding to 1ms
|
|
||||||
|
// Round down to the nearest 1ms
|
||||||
|
const double maxResolutionMs = 1;
|
||||||
return mSecureConnectionStart.IsNull()
|
return mSecureConnectionStart.IsNull()
|
||||||
? mZeroTime
|
? mZeroTime
|
||||||
: floor(TimeStampToDOMHighRes(mSecureConnectionStart) / 1) * 1;
|
: floor(TimeStampToDOMHighRes(mSecureConnectionStart) / maxResolutionMs) * maxResolutionMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
DOMTimeMilliSec
|
DOMTimeMilliSec
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue