easytimer.js icon indicating copy to clipboard operation
easytimer.js copied to clipboard

Sometimes browsers throttle intervals which are faster than seconds

Open deser opened this issue 1 year ago • 1 comments

Context:

  • https://github.com/microsoft/vscode-discussions/discussions/983
  • https://developer.chrome.com/blog/timer-throttling-in-chrome-88

I came across this as well, trying to utilize secondTenths is working most of the times, but at some unlucky moments, I'm getting throttled by the browsers itself.

Any advises or workarounds (suggested here) need to be introduced to library?

Thanks

deser avatar Mar 21 '24 16:03 deser

Probably moving setTimeout/setInterval as it is in https://github.com/turuslan/HackTimer will help

deser avatar Mar 21 '24 16:03 deser