Sha256: 94a7fa542db78ae188043fe9081f66bd28f9d5bbd8a592a45092945bf66ee605

Contents?: true

Size: 1.17 KB

Versions: 46

Compression:

Stored size: 1.17 KB

Contents

# 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 quantity of timers with the same
timeouts by creating only a few timers under the covers.

Node.js also offers the `immediate` APIs, which aren't yet available cross-browser, so we polyfill those:

* `setImmediate(callback, [arg], [...])`
* `clearImmediate(immediateId)`

## I need lots of timers and want to use linked list timers as Node.js does.

Linked lists are efficient when you have thousands (millions?) of timers with the same delay.
Take a look at [timers-browserify-full](https://www.npmjs.com/package/timers-browserify-full) in this case.

# License

[MIT](http://jryans.mit-license.org/)

Version data entries

46 entries across 45 versions & 16 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/timers-browserify/README.md
disco_app-0.18.0 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.18.2 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.16.1 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.15.2 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.18.4 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.18.1 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.14.0 test/dummy/node_modules/timers-browserify/README.md
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/timers-browserify/README.md
tang-0.2.1 spec/tang_app/node_modules/timers-browserify/README.md
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/timers-browserify/README.md
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/timers-browserify/README.md
ruby2js-4.0.4 lib/tasks/testrails/node_modules/timers-browserify/README.md
ruby2js-4.0.3 lib/tasks/testrails/node_modules/timers-browserify/README.md
tang-0.2.0 spec/tang_app/node_modules/timers-browserify/README.md
tang-0.1.0 spec/tang_app/node_modules/timers-browserify/README.md
tang-0.0.9 spec/tang_app/node_modules/timers-browserify/README.md
enju_library-0.3.8 spec/dummy/node_modules/timers-browserify/README.md
ilog-0.4.1 node_modules/timers-browserify/README.md