On sábado, 30 de março de 2013 09.34.24, Matthias Clasen wrote:
> >> - Various input events have a time field. The spec doesn't really say
> >> anything about this. What is it good for, and what units are these -
> >> monotonic time ?
> >
> > Monotonic (ideally) time in an undefined domain, i.e. they're only
> > meaningful on relation to each other.
>
> What can you do with them ? For the use case that Giulio mentioned
> (double-click detection), I'd need to know at least if the difference
> between two times is seconds or milliseconds or microseconds...

The protocol needs to specify the unit. It can't be dependent on the device
driver, that makes no sense. If it's in milliseconds, it will overflow every
49.7 days. If it's microseconds, it will overflow every 71.6 minutes.

It also needs to specify which timestamps are in the same time domain. Can two
timestamps be compared to each other only if:

 - they are in the same input device (same mouse, same keyboard), but not
across devices
 - they are in the same seat, but not across seats
 - they are in input event messages, but not other types of messages that
carry timestamps
 - no restriction

For example, imagine the case of trying to ensure that a Ctrl key was pressed
before a mouse click happened, after the events were plucked out of the event
stream.

Or is there another, recommended way of doing that, such as by using the
serials?

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to