process.hrtime

1.0.3 • Public • Published

process.hrtime

easily parse the return of hrtime method from process module into second/milisecond/microsecond/namisecond

var hrtime = require('process.hrtime');
var start = hrtime();

setTimeout(function () {
    console.log(hrtime(start));
    console.log(hrtime(start, 's') + ' s'); // 0.2s
    console.log(hrtime(start, 'ms') + ' ms'); // 200ms
    console.log(hrtime(start, 'us') + ' us'); // 200000 us
    console.log(hrtime(start, 'ns') + ' ns'); // 200000000 ns
}, 200);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    23
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    23
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i process.hrtime

Weekly Downloads

23

Version

1.0.3

License

ISC

Last publish

Collaborators

  • xosuperpig