tic-toc

0.1.0 • Public • Published

Tic Toc

Simple execution timer for node

# Install with npm 
$ npm install --save tic-toc
// Use tic-toc to time stuff. Destructering used for this example,
// but you can use `import X from 'tic-toc'` to prevent namespace issues.
import { tic, toc, last, history } from 'tic-toc';
tic();                            // Start timer
aFunctionThatIWouldLikeToTime();
toc();                            // Returns time in seconds
anotherFunction();
toc();                            // Returns the time in seconds since tic()
tic();                            // Resets the timer
console.log( last() );            // Prints last interval
console.log( history() );         // Prints all timed intervals

- MIT -

Readme

Keywords

Package Sidebar

Install

npm i tic-toc

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jense5