adequately good

decent programming advice

written by ben cherry




all posts filed under timers

Replacing `setTimeout` Globally

Sometimes, you might want to overwrite built-in global methods like setTimeout and setInterval. If you try, you might find that it’s much harder than you think to accomplish this in every browser, particularly if you ever want to find the originals again. After a lot of painful exp...

Minimum Timer Intervals in JavaScript

I was talking with a co-worker today about the behavior of setTimeout and setInterval when given a small interval, like 0 or 1. The expectation would be tha...