youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Mixed timing values between Date.now and performance.now causing skew #389

Closed nicksay closed 8 years ago

nicksay commented 8 years ago

Timing values reported can come from two clocks: Date.now via the spf.now function, and performance.now via the resourceTiming API. Currently, SPF mixes those clocks, which can cause skew. (This is visible in Chrome 48, for example.) To fix, always prefer the performance.now clock if available.

nicksay commented 8 years ago

Closed this issue too soon. We need to use this experimentally first to ensure browser support is as expected.