0

The QInputEvent's timestamp() method "Returns the window system's timestamp for this event." The return type is ulong, and contains milliseconds but the native timestamp on android is int64_t and contains nanoseconds.

Can I get timestamps with micro or nanosecond resolution for events in Qt?

I couldn't find the source code which sets the timestamp on QInputEvent on Android. Where is it? Maybe I could patch Qt to have an extra field with the nanosecond timestamp.

Tamas
  • 3,254
  • 4
  • 29
  • 51
  • I think the design assumption behind long is the time resolution between user inputs is too big to have nanoseconds as units. Do you have the possibility of below millisecond input difference in your case? – UmNyobe Sep 15 '14 at 13:09
  • Yeah, in case of manipulating music differentiating input timestamps up to 1/192k sec make sense. (e.g. in case of a drumming app) Microseconds were fine to me, Android issues nanosecond timestamps on the events though. – Tamas Sep 15 '14 at 13:39

0 Answers0