

JavaScript Timeout and Interval Manager - vhiremath4
https://github.com/vhiremath4/Tock

======
rudasn
This would be much much helpful if you had a single timer ticking and would
check to see which callbacks it should call on every tick. I would think the
goal would be to minimize the amount of timers you have on a page.

~~~
msfeldstein
Are timers expensive or something? It seems like having a constantly ticking
(and calling back) clock would be more costly.

------
TeeWEE
What's wrong with widow.setTimeout and window.setInterval?

~~~
vhiremath4
There's nothing wrong with setTimeout and setInterval. This simply gives you a
couple of additional things. It gives you a way to have all your timeouts
managed by another object, which allows you to see which timers are ticking at
any given moment, how many have finished and how much time there is left until
the timer fires. I think the big advantage is the last point. This obviously
isn't needed for everyone, but, when you do. :-) I may add on to Tock to have
some other nifty features in the future. Also, I noted all this in the README,
so please read that first.

