Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support process.hrtime.bigint() #2

Open
abrenneke opened this issue Apr 8, 2019 · 1 comment
Open

Support process.hrtime.bigint() #2

abrenneke opened this issue Apr 8, 2019 · 1 comment

Comments

@abrenneke
Copy link

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.

@TheOptimisticFactory
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants