timer-manager
v1.0.1
Published
easy to create a timer with a keyname and easy to remove with that keyname
Downloads
5
Maintainers
Readme
timer-manager
easy to create a timer in javascript with a keyname and remove it with same keyname
Usage
- Install
npm install timer-manager --save-dev
- createTimer
var Timer = require('timer-manager');
Timer.createTimer('testTimer' , 1000 , function(){
//do something
...
})
- removeTimer
Timer.removeElement('testTimer');
Tips
you do not need to worry about same timer keyname, if timer pool have a same keyname , timer-manager will remove the timer before create;