Drop-in replacement for standard JavaScript timer functions1 using Web Workers.
Most browsers now limit timers to firing at most once per second when the window or tab loses focus.
By utilizing Web Workers, unfocused sites can still use timers with the expected granularity.
Just include <script src="timer.js">
before any scripts that utilize timers and enjoy!