tick-counter

1.0.0 • Public • Published

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)
})

Package Sidebar

Install

npm i tick-counter

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

2.7 kB

Total Files

4

Last publish

Collaborators

  • danisl99