pretty-time icon indicating copy to clipboard operation
pretty-time copied to clipboard

Support process.hrtime.bigint()

Open abrenneke opened this issue 6 years ago • 1 comments

It would be useful if this module also supported hrtime.bigint().

If you do

const start = process.hrtime.bigint();
prettyTime(process.hrtime.bigint() - start);

You'll get a

TypeError: Cannot mix BigInt and other types, use explicit conversions
    at module.exports (pretty-time/index.js:32:19)

So it's neccesary to do prettyTime(Number(process.hrtime.bigint() - start)) - would be nice it this module did that itself.

abrenneke avatar Apr 08 '19 04:04 abrenneke

Moreover, process.hrtime([time]) has been deprecated, leaving process.hrtime.bigint() the only option for now:

image

See: https://nodejs.org/api/process.html#process_process_hrtime_time

TheOptimisticFactory avatar May 24 '21 10:05 TheOptimisticFactory