We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
process.hrtime([time])
time
time is an optional parameter that must be the result of a previous process.hrtime() call to diff with the current time.
demo script:
var NS_PER_SEC = 1e9; var time = process.hrtime(); // [ 16264, 282919475 ] setTimeout(() => { var diff = process.hrtime(time); // expecting [ 1, 2476940 ] // actual [ 16265, 285396415 ] console.log(`Benchmark took ${diff[0] * NS_PER_SEC + diff[1]} nanoseconds`); }, 1000);
The text was updated successfully, but these errors were encountered:
console.time
console.timeEnd
No branches or pull requests
demo script:
The text was updated successfully, but these errors were encountered: