npm.io
1.1.2 • Published 7 years ago

time-inspector

Licence
MIT
Version
1.1.2
Deps
0
Size
3 kB
Vulns
0
Weekly
0

time-inspector

MIT License Build Status

NPM status

NodeJS time inspector allowing very easy detection of bottlenecks.

install

npm i --save-dev time-inspector

usage

const time = require('time-inspector').default;

time(); // for the first call it returns 0
foo();
console.log(time()); // it returns the time (in seconds with nanoseconds precision) elapsed from the previous call
bar();
console.log(time()); // again it returns the time elapsed from the previous call

Keywords