Re: Specifying window.performance.now()

On 2/29/12 12:53 PM, Jatinder Mann wrote:
>> In any case, I somewhat doubt requestAnimationFrame could change here.
>> Too much web content is depending on those times being comparable to JS Date simply because it had no other choice.  :(
>>
>> -Boris
>
> One of the motivations for performance.now() was to get requestAnimationFrame to use it, per this discussion: http://lists.w3.org/Archives/Public/public-web-perf/2011Aug/0039.html.

Note, though, that this is likely to cause incorrect behavior; the right 
thing to compare requestAnimationFrame times to are sample times, at 
least if you want to synchronize multiple animations, not "right now", 
while performance.now() provides the latter...

So I'm not even entirely convinced that using the same timebase for them 
is a good thing; it's likely to make authors write buggy code.

-Boris

Received on Thursday, 1 March 2012 15:25:26 UTC