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.
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.
5 comments
[ 117 ms ] story [ 166 ms ] thread