W3C home > Mailing lists > Public > public-webevents@w3.org > April to June 2011

Re: Use case for the timestamp attribute

From: Anders Höckersten <andersh@opera.com>
Date: Wed, 06 Apr 2011 08:45:22 +0200
To: "Matt Brubeck" <mbrubeck@mozilla.com>
Cc: "public-webevents@w3.org" <public-webevents@w3.org>, "Doug Schepers" <schepers@w3.org>, "Arthur Barstow" <art.barstow@nokia.com>
Message-ID: <op.vth7pwwe3ne1wq@theatreofmagic.local>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 6 April 2011 06:46:31 GMT