Open fengb opened 4 years ago
There's also been a regression with background processing. setInterval
doesn't seem to be as guaranteed to run as setTimeout
(although neither is actually guaranteed). The recommendation is the use a WebWorker for the timer, which feels a little heavy but it can work.
When the timer doesn't fire for... days, the counter overflows and does bad stuff. This really only happens when the laptop / browser goes to sleep.
We should add a hook to disable/reenable the runloop upon sleep/wake.