package
Convert the result of `process.hrtime.bigint()` to seconds, milliseconds, nanoseconds
npm install convert-hrtimeGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
3.3 kB
Includes dependencies.
Convert the result of
process.hrtime.bigint()to seconds, milliseconds, nanoseconds
$ npm install convert-hrtimeimport convertHrtime from 'convert-hrtime';
const startTime = process.hrtime.bigint();
expensiveCalculation();
const diff = process.hrtime.bigint() - startTime;
convertHrtime(diff);
//=> {seconds: 0.000002399, milliseconds: 0.002399, nanoseconds: 2399n}