timers-browserify

WebJar for timers-browserify

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

timers-browserify
Последняя версия

Последняя версия

2.0.12
Дата

Дата

Тип

Тип

jar
Описание

Описание

timers-browserify
WebJar for timers-browserify
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/browserify/timers-browserify

Скачать timers-browserify

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/timers-browserify/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>timers-browserify</artifactId>
    <version>2.0.12</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/timers-browserify/
implementation 'org.webjars.npm:timers-browserify:2.0.12'
// https://jarcasting.com/artifacts/org.webjars.npm/timers-browserify/
implementation ("org.webjars.npm:timers-browserify:2.0.12")
'org.webjars.npm:timers-browserify:jar:2.0.12'
<dependency org="org.webjars.npm" name="timers-browserify" rev="2.0.12">
  <artifact name="timers-browserify" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='timers-browserify', version='2.0.12')
)
libraryDependencies += "org.webjars.npm" % "timers-browserify" % "2.0.12"
[org.webjars.npm/timers-browserify "2.0.12"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : setimmediate jar [1.0.4,2)

Модули Проекта

Данный проект не имеет модулей.

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 in this case.

License

MIT

org.webjars.npm

Версии библиотеки

Версия
2.0.12
2.0.11
2.0.10
2.0.6
2.0.2
1.4.2
1.0.1