sleep

WebJar for sleep

Лицензия

Лицензия

MIT
Группа

Группа

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

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

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

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

4.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

sleep
WebJar for sleep
Ссылка на сайт

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

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

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

https://github.com/ErikDubbelboer/node-sleep

Скачать sleep

Имя Файла Размер
sleep-4.0.0.pom
sleep-4.0.0.jar 6 KB
sleep-4.0.0-sources.jar 22 bytes
sleep-4.0.0-javadoc.jar 22 bytes
Обзор

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

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

Зависимости

compile (1)

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

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

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

Build Status Build status FOSSA Status

sleep

Add sleep(), msleep() and usleep() to Node.js, via a C++ binding.

This is mainly useful for debugging.

Note that because this is a C++ module, it will need to be built on the system you are going to use it on.

These calls will block execution of all JavaScript by halting Node.js' event loop!

Alternative

When using nodejs 9.3 or higher it's better to use Atomics.wait which doesn't require compiling this C++ module. The sleep and msleep functions can be implemented like this:

function msleep(n) {
  Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, n);
}
function sleep(n) {
  msleep(n*1000);
}

If you require usleep this module is still required.

Usage

var sleep = require('sleep');
  • sleep.sleep(n): sleep for n seconds
  • sleep.msleep(n): sleep for n miliseconds
  • sleep.usleep(n): sleep for n microseconds (1 second is 1000000 microseconds)

License

FOSSA Status

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

Версия
4.0.0