Skip to content

A small tool to make interval which stop when the web browser's document is inactive.

Notifications You must be signed in to change notification settings

simonmartinez/ts-active-interval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Active Interval

A small tool to make interval which stop when the web browser's document is inactive. https://www.npmjs.com/package/active-interval

Installation

$ npm install active-interval --save

Usage

import { ActiveInterval } from 'active-interval';
ai: ActiveInterval = new ActiveInterval();
this.ai.setInterval(() => {
    console.log(+new Date())
}, 2500, true);

About

A small tool to make interval which stop when the web browser's document is inactive.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published