Skip to content
/ timer Public

drop-in replacement for javascript timer functions

License

Notifications You must be signed in to change notification settings

fockjef/timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

timer ⏳

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!

Footnotes

  1. https://developer.mozilla.org/en-US/docs/Web/API/setInterval
    https://developer.mozilla.org/en-US/docs/Web/API/setTimeout
    https://developer.mozilla.org/en-US/docs/Web/API/clearInterval
    https://developer.mozilla.org/en-US/docs/Web/API/clearTimeout

About

drop-in replacement for javascript timer functions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published