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

Fix incorrect time now in Safari iOS 8 #12

Closed
wants to merge 1 commit into from

Conversation

tgohn
Copy link

@tgohn tgohn commented Mar 10, 2016

In Safari iOS 8, requestAnimationFrame is present but performance.now is not.

So, inconsistent of time "now" will happen since we rely on both time passed in by requestAnimationFrame (time since navigationStart) and Date.now() (time since epoch) in other cases.

With this changeset, I am calling performance.now unnecessarily on mordern browsers on every wake() though 😕

In Safari iOS 8, `requestAnimationFrame` is present but
`performance.now` is not.

So, inconsistent of time now will happen when we both rely on `time`
passed in by `requestAnimationFrame` (time since navigationStart) vs
Date.now() (time since epoch) in other cases.
@mbostock mbostock self-assigned this Apr 29, 2016
@mbostock mbostock closed this in d26677e May 13, 2016
@mbostock
Copy link
Member

Thanks for the report. I chose a slightly different fix that avoids the kludge on modern browsers.

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

Successfully merging this pull request may close these issues.

2 participants