# driftless

> Driftless setInterval and setTimeout replacement for Node and the browser

Latest version **2.0.3** (published 2018-05-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install driftless
pnpm add driftless
yarn add driftless
bun add driftless
```

## 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 | 2.0.3 |
| Published | 2018-05-28 |
| First published | 2018-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/driftless) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 85 |
| Author | Dan Kaplun |
| Maintainers | dbkaplun |
| Keywords | setInterval, setTimeout, precise, accurate, drift, driftless |

## Links

- npm: https://www.npmjs.com/package/driftless
- Repository: https://github.com/dbkaplun/driftless
- Issues: https://github.com/dbkaplun/driftless/issues
- npm.io page: https://npm.io/package/driftless

## Dependencies (1)

- [present](https://npm.io/package/present.md) ^0.0.3

## Recent versions

- 2.0.3 (latest) — 2018-05-28
- 2.0.2 — 2018-05-28
- 2.0.1 — 2018-05-28
- 2.0.0 — 2018-05-27

## README

# `driftless` [![Build Status](https://travis-ci.org/dbkaplun/driftless.svg?branch=master)](https://travis-ci.org/dbkaplun/driftless)

Driftless setInterval and setTimeout replacement for Node and the browser

[![comparison](https://github.com/dbkaplun/driftless/raw/master/comparison.gif)](https://asciinema.org/a/183890)

## Usage

```
npm install driftless
```

```js
import {
  setDriftlessTimeout,
  setDriftlessInterval,
  clearDriftless,
} from 'driftless';
// Use like setTimeout and setInterval
```

## How it works

`driftless` repeatedly calls setTimeout in advance of the requested timeout for
greater accuracy. It does this recursively, until the timeout is reached within
a given threshold.

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