0.2.0 • Published 7 years ago

synced-interval v0.2.0

Weekly downloads
29
License
ISC
Repository
github
Last release
7 years ago

Build Status

Synced Interval

A interval library which syncs automatically with the browser time.

Why

In React Apps the applications might be rendered at arbitrary times. When implementing a timer or a stop watch this might lead to a jumpy behaviour of the numbers as the Demo shows. This library solves this issue by syncing the timer with the time of the browser.

Usage

npm install synced-interval --save
import { 
  setSyncedInterval, 
  clearSyncedInterval, 
} from 'synced-interval';

const timeoutId = setSyncedInterval(() => { /* do something crazy */}, 200);
clearSyncedInterval(timeoutId);
0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago