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

High resolution timers #13

Open
antaranyan opened this issue Nov 2, 2019 · 0 comments
Open

High resolution timers #13

antaranyan opened this issue Nov 2, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@antaranyan
Copy link
Contributor

antaranyan commented Nov 2, 2019

The timestamp is not actually high-resolution. To mitigate security threats such as Spectre, browsers currently round the results to varying degrees. (Firefox started rounding to 1 millisecond in Firefox 60.) Some browsers may also slightly randomize the timestamp. The precision may improve again in future releases; browser developers are still investigating these timing attacks and how best to mitigate them.

Consider using performance.now() for browsers and process.hrtime.bigint() in Node.js.

@antaranyan antaranyan added enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant