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

Relying on setInterval #6

Open
DavidRHulme opened this issue Apr 6, 2018 · 2 comments
Open

Relying on setInterval #6

DavidRHulme opened this issue Apr 6, 2018 · 2 comments

Comments

@DavidRHulme
Copy link

From a metronome app I wrote, I don't think you can rely on setInterval for timing if you want it to be precise. Over time it will drift. Use can use something like performance.now() instead.

@nermand
Copy link

nermand commented Apr 6, 2018

Agree. It is a Google Audit suggested method, described here:
https://developers.google.com/web/tools/lighthouse/audits/date-now

@saeta-eth
Copy link
Owner

saeta-eth commented Apr 9, 2018

yes, I agree too. I will take a look at this in the next version.

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

No branches or pull requests

3 participants