Re: Use case for the timestamp attribute

On Wed, 06 Apr 2011 05:08:05 +0200, Matt Brubeck <mbrubeck@mozilla.com>  
wrote:

> On 04/05/2011 12:15 AM, Anders Höckersten wrote:
>> Let's say you have a webpage that for whatever reason wants to know
>> exactly when the user starts touching the screen (some kind of game
>> perhaps?). Now, it's easy to do this by create your own timestamp
>> whenever the handlers for TouchStart is called. However, this only
>> provide measurements of when the call to TouchStart happened. If the
>> system is busy, this call will be delayed compared to when the actual
>> touch event happened, so the calculated timestamp will be off by a few
>> milliseconds (or even more than that).
>
> I think this problem is best solved by the Event.timeStamp attribute  
> from DOM Level 2 Events.  If Event.timeStamp is not adequate, it should  
> be fixed (see discussion at [1]).
>
> http://lists.w3.org/Archives/Public/www-dom/2010OctDec/0069.html

I was not aware of the existence of Event.timestamp. We can consider my  
use case to be addressed by this then.

/Anders

Received on Wednesday, 6 April 2011 06:46:30 UTC