tick-counter
v1.0.0
Published
Count ticks per X seconds
Downloads
6
Maintainers
Readme
tick-counter
Counts ticks per X seconds
Installation
$ npm install tick-counter
Example
const ticker = new Ticker() // Or use new "Ticker(5000)" for a specific period
setInterval(() => {
ticker.tick();
}, 250);
setTimeout(() => {
ticker.terminate()
}, 4000)
ticker.on('ticks', (total) => {
console.log(total)
})