-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Programmability
-
Minor Change
-
ALL
-
0
-
None
-
None
-
None
-
None
-
None
-
None
-
None
See BF-45916
- MozJSScriptEngine::sleep tries to sleep in 1 millisecond slices to not block interrupts.
- It does not take into account time actually slept, only what it asked to sleep and then subtracts that from the remaining time to sleep. The result is a compounding sleep error per millisecond of requested sleep time, exacerbated by coarse clock granularity and system load.
- On recent passing systems, the 2s sleep requested in max_time_ms.js takes ~4.5s. Since the clock granularity on windows systems are roughly 3.5ms, it means an immediate 2.5ms unaccounted time per 1ms requested. The same test runs in ~7.5-9s.