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

Update timestamp generation to prefer `performance.now` #392

Closed nicksay closed 8 years ago

nicksay commented 8 years ago

Clock skew can occur when reporting timing values from both Date.now and performance.now (or the resourceTiming API). To ensure monotonic timestamps, update the timestamp generation done by spf.now to prefer the performance.now clock if it is available.

Closes #389

nicksay commented 8 years ago

@rviscomi PTAL when you get a chance

rviscomi commented 8 years ago

lgtm