Skip to content

A variable interval. The timeout period can be changed dynamically.

Notifications You must be signed in to change notification settings

marcelklehr/intervarl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

a variable interval

dynamically change your interval period

Install

npm install intervarl or component install marcelklehr/intervarl

Usage

var setInterval = require('intervarl').setInterval

var interval = setInterval(function() {
  console.log('ShAZzAmM')
  if(interval.period < 20000) return interval.period = interval.period+1000
  interval.period = interval.period-1000
}, 0)

setTimeout(function() {
  interval.stop()
}, 60000)

License

MIT

About

A variable interval. The timeout period can be changed dynamically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published