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: Tue, 05 Apr 2011 09:15:53 +0200
To: "ext Matt Brubeck" <mbrubeck@mozilla.com>, "public-webevents@w3.org" <public-webevents@w3.org>, "Doug Schepers" <schepers@w3.org>, "Arthur Barstow" <art.barstow@nokia.com>
Message-ID: <op.vtgegrou3ne1wq@theatreofmagic.local>
On Mon, 04 Apr 2011 19:32:32 +0200, Arthur Barstow <art.barstow@nokia.com>  
wrote:

> On Mar/30/2011 6:28 PM, ext Matt Brubeck wrote:
>> Can someone provide a realistic use case for the TouchPoint "timestamp"  
>> attribute?  I'm having trouble seeing why this is useful, especially  
>> since the same information is straightforward to get without putting it  
>> in a special attribute.
>
> Doug - did you spec this attribute for legacy reasons?
>
> If no one provides a compelling use case before by the end of the week,  
> I think Matt should remove it, so please speak up if you have a good UC  
> for timestamp.
>
> -ArtB

I can see one use case for something like this, but I don't consider it  
important enough to argue strongly for it. I'll raise it for the sake of  
discussion.

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). If we keep the attribute however, we can specify  
that this is the timestamp of when the system got the touch event. This  
should be much more accurate and independent of how busy the system in  
general is.

As an example of games that might desire this kind of precision on  
TouchStart, consider a touch browser implementation of Dance Dance  
Revolution[1] or Elite Beat Agents[2].

/Anders

[1] http://en.wikipedia.org/wiki/Dance_Dance_Revolution
[2] http://en.wikipedia.org/wiki/Elite_Beat_Agents
Received on Tuesday, 5 April 2011 07:16:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 5 April 2011 07:16:34 GMT