mirror of
https://github.com/S2-/minifyfromhtml.git
synced 2025-08-03 04:10:04 +02:00
update modules
This commit is contained in:
4
node_modules/w3c-hr-time/lib/calculate-clock-offset.js
generated
vendored
4
node_modules/w3c-hr-time/lib/calculate-clock-offset.js
generated
vendored
@@ -14,7 +14,9 @@ const clockIsAccurate = require("./clock-is-accurate");
|
||||
function calculateClockOffset() {
|
||||
const start = Date.now();
|
||||
let cur = start;
|
||||
while (cur === start) {
|
||||
// Limit the iterations, just in case we're running in an environment where Date.now() has been mocked and is
|
||||
// constant.
|
||||
for (let i = 0; i < 1e6 && cur === start; i++) {
|
||||
cur = Date.now();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user