You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matthew Butterick 3f36e2ce2c | 7 years ago | |
---|---|---|
.. | ||
example/enroll | 7 years ago | |
node_modules/process | 7 years ago | |
.npmignore | 7 years ago | |
LICENSE.md | 7 years ago | |
README.md | 7 years ago | |
main.js | 7 years ago | |
package.json | 7 years ago |
README.md
Overview
Adds support for the timers
module to browserify.
Wait, isn't it already supported in the browser?
The public methods of the timers
module are:
setTimeout(callback, delay, [arg], [...])
clearTimeout(timeoutId)
setInterval(callback, delay, [arg], [...])
clearInterval(intervalId)
and indeed, browsers support these already.
So, why does this exist?
The timers
module also includes some private methods used in other built-in
Node.js modules:
enroll(item, delay)
unenroll(item)
active(item)
These are used to efficiently support a large quanity of timers with the same timeouts by creating only a few timers under the covers.