We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2011 - [RFE] provide timestamp from backend event
Summary: [RFE] provide timestamp from backend event
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 enhancement
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-05 14:40 UTC by Alexander Hirsch
Modified: 2013-08-05 14:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Hirsch 2013-08-05 14:40:00 UTC
Currently the SDL_*Event timestamp is not the time the event occurred, but the time the event was polled by SDL.
It would be great if you could obtain the timestamp from the backend event, for events where the backend supports that. Otherwise you can still "fall back" to the time when the event was polled.

In the public API there should be a way of checking if the timestamp was provided by the backend event or SDL.

Since the backend and SDL probably use different methods of providing a time, they won't be comparable.
I don't think clock skew can happen, since it is on the same computer, so it should be possible to convert the timestamp to something comparable with SDL_GetTicks(). Otherwise you'd also need a SDL_GetBackendTicks() or something.