js-timer
v0.1.1
Published
Javascript timer object
Downloads
1
Readme
Javascript Timer as Object
Usage:
/**
* @param {Function} Callback
* @param {string} Stop Time
* @param {Boolean} Debug Mode
* @param {Number} Timer Interval (miliseconds)
* @return {void} any
*/
Timer(callback, stop_time, [debug = false], [interval = 1000])
Demo:
const Timer = require('./main')
let alarmTimer = new Timer(() => {
console.log('Wake Up!')
}, "2017-04-22 12:30:00", true)