# sleep-ms

> Halt execution for a specific time period

Latest version **2.0.1** (published 2016-09-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install sleep-ms
pnpm add sleep-ms
yarn add sleep-ms
bun add sleep-ms
```

Provides the command `sleepms`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2016-09-08 |
| First published | 2015-07-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Shamasis Bhattacharya |
| Maintainers | shamasis |
| Keywords | sleep, cli |

## Links

- npm: https://www.npmjs.com/package/sleep-ms
- Repository: https://github.com/shamasis/sleep-ms
- Homepage: https://github.com/shamasis/sleep-ms#readme
- Issues: https://github.com/shamasis/sleep-ms/issues
- npm.io page: https://npm.io/package/sleep-ms

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2016-09-08
- 2.0.0 — 2015-07-19
- 1.0.0 — 2015-07-06

## README

# sleep-ms

Sleep MS is primarily a command-line tool that emulates BASH [SLEEP](https://en.wikipedia.org/wiki/Sleep_%28Unix%29) 
command using NodeJS.

## Why sleep-ms?

First and foremost, it provides the ability to stall execution in milliseconds. SLEEP command supports seconds only 
(unless you install bash with [loadable sleep](http://sleep.dashnine.org/docs/api/sleep/interfaces/Loadable.html)).
Secondly, a number of CI platforms do not support sleep within scripts, but if you are on NodeJS stack, you can easily
utilise this module to overcome this limitation.

## Installing sleep-ms

```terminal
npm install sleep-ms --save;
```

## Using CLI

```terminal
# sleep for 1 second
sleepms 1000;
```
> It is recommended that you do a global install using  `npm install sleep-ms -g;`

## Using the JS API

Usually there would not be any need to use this since using `setTimeout` in JavaScript is equivalent to this.

```javascript
var sleepms = require('sleep-ms');

// sleep for one second
sleepms(1000);
```

---
_Source: https://npm.io/package/sleep-ms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
