Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

timer-promise

Promise version of setTimeout and clearTimeout

You can start and stop timer like this.

var timer = require('timer-promise');

timer.start('foo', 5000).
  then(function() {
  }, function(cancelled) {
  });
...
timer.stop('foo');

instead of

var timeoutId = setTimeout(function() {
}, 5000);
...
clearTimeout(timeoutId);

About

Promise version of setTimeout and clearTimeout

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages