# set-accurate-timeout

> Sets an accurate timeout that respects date, and the result can't be less than the specified amount of milliseconds. Implemented by recursive execution of native setTimeout. The error is about 10ms.

Latest version **1.0.1** (published 2020-05-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install set-accurate-timeout
pnpm add set-accurate-timeout
yarn add set-accurate-timeout
bun add set-accurate-timeout
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-05-05 |
| First published | 2020-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/set-accurate-timeout) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | NotACircle |
| Maintainers | notacircle |
| Keywords | timeout, accurate, guaranteed, setTimeout, precise, setInterval |

## Links

- npm: https://www.npmjs.com/package/set-accurate-timeout
- Repository: git@gitlab.com-notacircle:notacircle/set-accurate-timeout
- npm.io page: https://npm.io/package/set-accurate-timeout

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^4.1.1

## Recent versions

- 1.0.1 (latest) — 2020-05-05
- 1.0.0 — 2020-05-05

## README

#### Sets an accurate timeout that respects date, and the result can't be less than the specified amount of milliseconds. Implemented by recursive execution of native setTimeout. The error is about 10ms.

#### Install package

```bash
npm install set-accurate-timeout
```

#### Install dependencies and build library

- Install dependencies

  `npm install`

- Run tests

  `npm run test`

#### Usage example

```js
const setAccurateTimeout=require('set-accurate-timeout')
setAccurateTimeout(() => {
  console.log('So, 5s have passed.')
}, 5000)
```

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