# synced-interval

> A interval which syncs with the clock

Latest version **0.2.0** (published 2017-09-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install synced-interval
pnpm add synced-interval
yarn add synced-interval
bun add synced-interval
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-09-14 |
| First published | 2016-11-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Webpapaya |
| Maintainers | webpapaya |
| Keywords | setInterval, clearInterval, es6, es2016 |

## Links

- npm: https://www.npmjs.com/package/synced-interval
- Repository: https://github.com/webPapaya/synced-interval
- Homepage: https://github.com/webPapaya/synced-interval#readme
- Issues: https://github.com/webPapaya/synced-interval/issues
- npm.io page: https://npm.io/package/synced-interval

## Recent versions

- 0.2.0 (latest) — 2017-09-14
- 0.1.4 — 2016-12-12
- 0.1.3 — 2016-12-12
- 0.1.1 — 2016-11-28
- 0.1.0 — 2016-11-28

## README

[![Build Status](https://travis-ci.org/webpapaya/synced-interval.svg?branch=master)](https://travis-ci.org/webpapaya/synced-interval)

# 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](https://webpapaya.github.io/synced-interval/) 
shows. This library solves this issue by syncing the timer with the 
time of the browser.

# Usage

````
npm install synced-interval --save
````


````javascript
import { 
  setSyncedInterval, 
  clearSyncedInterval, 
} from 'synced-interval';

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

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