protocol questions

Nick Kisialiou kisialiou at gmail.com
Sat Mar 30 17:52:33 PDT 2013


What about "long int" type to store the time stamps? Even in microseconds
it will take longer than 100 years to overflow 2^63.

NK


On Sat, Mar 30, 2013 at 9:55 AM, Thiago Macieira
<thiago.macieira at intel.com>wrote:

> 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
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130330/0b89c219/attachment.html>


More information about the wayland-devel mailing list