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

Re: Use case for the timestamp attribute

From: Matt Brubeck <mbrubeck@mozilla.com>
Date: Tue, 05 Apr 2011 20:08:05 -0700
Message-ID: <4D9BD915.7050206@mozilla.com>
To: Anders Höckersten <andersh@opera.com>
CC: "public-webevents@w3.org" <public-webevents@w3.org>, Doug Schepers <schepers@w3.org>, Arthur Barstow <art.barstow@nokia.com>
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
Received on Wednesday, 6 April 2011 03:08:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 6 April 2011 03:08:35 GMT