Skip to content

Driftless setInterval and setTimeout replacement for Node and the browser

License

Notifications You must be signed in to change notification settings

dbkaplun/driftless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

May 28, 2018
affdcda · May 28, 2018

History

35 Commits
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
May 27, 2018
Apr 5, 2014
May 28, 2018
May 27, 2018
Apr 5, 2014
May 28, 2018
May 27, 2018
May 28, 2018
May 28, 2018

Repository files navigation

driftless Build Status

Driftless setInterval and setTimeout replacement for Node and the browser

comparison

Usage

npm install driftless
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.