• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UIEvent timestamp clarification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIEvent timestamp clarification


  • Subject: Re: UIEvent timestamp clarification
  • From: Matt Neuburg <email@hidden>
  • Date: Fri, 14 Jan 2011 07:56:39 -0800

On Wed, 12 Jan 2011 18:36:56 -0500, Andrew Coad <email@hidden> said:
>
>Reading through the docs, the approximate flow from a user touching an interface component (e.g. a button) to the touch event being processed by the application is:
>
> - User touches (e.g. a UIButton), a "touch" object is created and enqueued on the dispatch thread (main thread)
> - The touch object is dequeued, a UIEvent object is created and dispatched to the target object (for handling)
>
>The docs also state that the timestamp of the UIEvent [event timestamp] is the time that the event was created.  From this I assume that [event timestamp] is somewhat later than the actual time that user touched the UIButton - how much later depends on system activity around that time.  Is this assumption correct? If so, is there a way to get the time that the user touched the interface?  The small number (indeterminate) of milliseconds lag between touch time and event time is important to me.  I can tolerate processing the event after an indeterminate lag but I do need to know when the actual touch occurred.

The problem is that the timestamp on the UIEvent is as close to "when the actual touch occurred" as you're going to get - regardless of what it may really indicate. The actual touch is reported to your app from outside the app, i.e. by the system. The system surely puts a timestamp on that report, and that timestamp is probably reproduced as the timestamp on the UIEvent, in which case you are worrying needlessly. But if that timestamp is NOT the timestamp on the UIEvent, you can't access it, so you are still worrying needlessly. :) m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Overriding target and action of backBarButtonItem
  • Next by Date: Re: Determining whether a dictionary is mutable or not
  • Previous by thread: Re: array contents and objects
  • Next by thread: NSSegmentedControl Label
  • Index(es):
    • Date
    • Thread