leaysgur / sec-count-down-timer

Count down rest seconds

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sec-count-down-timer

Count down rest seconds

// Require
var SecCountDownTimer = require('sec-count-down-timer');

// Construct
var timer = new SecCountDownTimer({
    startSec: 30,
    onStart:  function() { console.log('START!'); }
    onCount:  function(sec) { console.log(sec); },
    onEnd:    function() { console.log('END!'); }
});

// Execute
timer.start();

// Others
timer.pause();
timer.resume();
timer.stop();

About

Count down rest seconds

License:MIT License


Languages

Language:JavaScript 100.0%