MCPcopy Index your code
hub / github.com/nodejs/node / platformTimeout

Function platformTimeout

test/common/index.js:310–328  ·  view source on GitHub ↗
(ms)

Source from the content-addressed store, hash-verified

308
309
310function platformTimeout(ms) {
311 const multipliers = typeof ms === 'bigint' ?
312 { two: 2n, four: 4n, seven: 7n } : { two: 2, four: 4, seven: 7 };
313
314 if (isDebug)
315 ms = multipliers.two * ms;
316
317 if (exports.isAIX || exports.isIBMi)
318 return multipliers.two * ms; // Default localhost speed is slower on AIX
319
320 if (isPi())
321 return multipliers.two * ms; // Raspberry Pi devices
322
323 if (isRiscv64) {
324 return multipliers.four * ms;
325 }
326
327 return ms;
328}
329
330const knownGlobals = new Set([
331 AbortController,

Calls 1

isPiFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…