0.0.2 • Published 2 years ago
nodetimer.js v0.0.2
NodeTimer
Create a timer!
Example
const Timer = require('nodetimer.js')
const timer = new Timer(
'5 seconds', // Timer length
's', // This is how often it should tick. Options are ms for once every millisecond or s, once every second
() => { console.log("Timer is done!") }, // This is a callback to run when the timer has completed
(at) => { console.log(at) } // This is a callback to run when the time elapses
)
Need help?
Check out our docs!