0.1.1 • Published 7 years ago

tick-of-clock v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

tick-of-clock

Stopwatch || Countdown ⏰

const toc = require('tick-of-clock');
let timer = toc();

timer.start(); //starts stopwatch
timer.start(2000); //starts countdown with 2000ms
timer.stop();
timer.reset(); // resets time to 0
timer.getTime(); // returns amount of ms that have passed

Events

start

stop

reset

How to use

timer.on('start', () => console.log("Let's Rock!"));
0.1.1

7 years ago

0.1.0

7 years ago