UIEvent Timestamp

When handling a UIButton touch, you are given a UIEvent object. A UIEvent object has a time stamp, which is referred to in the Apple documentation as the "UIEvent Class Reference". The documentation for the main event loop says that: "The application object receives the topmost object in the event queue, converts it into an event object (UIEvent) ..."

Whether the [UIEvent timestamp] indicates the time at which the UIEvent object is created (that is, after processing the touch event from the main loop and hance is not remotely in real time) or refers to the time, the contact object was created (and therefore how can be closer to the image of the actual user time touch9?

+4
source share
1 answer

If you want to check, configure the view to register touch timestamps, and then configure the button to block the main stream for several seconds (get a for loop to count up to 100 million).

While the main thread is spinning, tap your logging type, and then look at the timestamps - if they are evenly distributed, then the OS’s timestamp and accuracy.

0
source

Source: https://habr.com/ru/post/1333930/


All Articles