RE: ISSUE-3 (monotonic-clock): Animation frame times should be monotonically increasing [Request Animation Frame]

A slight clarification of animationStartTime's proposed properties:

1.       Millisecond resolution

2.       Monotonically increasing

3.       Returns the timestamp of the start of the current refresh interval, so multiple animations can be synchronized with each other

This will be different from a generic millisecond-precision-monotonic clock because of #3.

We have discussed the desire of having a standardized, monotonically increasing, 1ms resolution clock to replace some uses of "new Date()" several times in the working group.  We have defined the timestamps for NavigationTiming, UserTiming and ResourceTiming to be monotonically increasing, and have this similarly proposed attribute for RequestAnimationFrame.

It seems like a good time to pursue standardizing a new interface with these properties so all of the timestamps we're talking about are using the same base implementation and can be compared to each other.

- Nic

From: public-web-perf-request@w3.org [mailto:public-web-perf-request@w3.org] On Behalf Of Robert O'Callahan
Sent: Sunday, May 22, 2011 9:15 PM
To: Jatinder Mann
Cc: public-web-perf@w3.org
Subject: Re: ISSUE-3 (monotonic-clock): Animation frame times should be monotonically increasing [Request Animation Frame]

On Thu, May 19, 2011 at 12:08 PM, Jatinder Mann <jmann@microsoft.com<mailto:jmann@microsoft.com>> wrote:
As we have been evaluating this spec, the concept of a window.animationStartTime property seems like a very reasonable property to standardize. This property will allow all animations to have the same starting point. Without standardizing this property, web developers will be forced to use Date.now(), which currently is not defined as monotonically increasing and may not always have a millisecond resolution.

We feel that both window.animationStartTime and the requestAnimationFrame() callback timestamp should be implemented as monotonically increasing clocks, in UTC format with millisecond resolution.

Please call it animationTime or even window.currentTime. Then this clock can be used for other things without major cognitive dissonance.

Rob
--
"Now the Bereans were of more noble character than the Thessalonians, for they received the message with great eagerness and examined the Scriptures every day to see if what Paul said was true." [Acts 17:11]

Received on Monday, 23 May 2011 22:24:04 UTC