Skip to content

Human-readable interface for `setTimeout`, `clearTimeout` functions

Notifications You must be signed in to change notification settings

vitalk/timer.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is it?

Simple pure Javascript timer.

Just a wrapper for setTimeout, clearTimeout functions with human-readable interfaces.

// Define a new deferred task
var task = new Timer(function() { console.log('DONE'); }, 5e3);

// then pause for some reasons
task.pause()

// and resume
task.resume()

// or even restart
task.restart();

License

Licensed under the MIT license.

Copyrights

Copyrights © 2013 by Vital Kudzelka [email protected].

About

Human-readable interface for `setTimeout`, `clearTimeout` functions

Resources

Stars

Watchers

Forks

Packages

No packages published