requestAnimationFrame: what exactly is the timestamp?

后端 未结 3 1505
伪装坚强ぢ
伪装坚强ぢ 2021-02-20 11:15

I have always thought that timestamp used by requestAnimationFrame is the same as usual timestamp in JavaScript, that is number of milliseconds since January 1st, 1970. Today I

3条回答
  •  天涯浪人
    2021-02-20 11:41

    Finally, I found the answer in an article by Paul Irish and the specification of High Resolution time:

    requestAnimationFrame API: now with sub-millisecond precision

    High Resolution Time

    The rAF time is "measured relative to the start of navigation of the document", that is relative to the "navigationStart attribute of the PerformanceTiming interface".

提交回复
热议问题