<div dir="ltr"><div class="gmail_extra">What about "long int" type to store the time stamps? Even in microseconds it will take longer than 100 years to overflow 2^63.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
NK</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 30, 2013 at 9:55 AM, Thiago Macieira <span dir="ltr"><<a href="mailto:thiago.macieira@intel.com" target="_blank">thiago.macieira@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On sábado, 30 de março de <a href="tel:2013%2009.34.24" value="+12013093424">2013 09.34.24</a>, Matthias Clasen wrote:<br>
> >> - Various input events have a time field. The spec doesn't really say<br>
> >> anything about this. What is it good for, and what units are these -<br>
> >> monotonic time ?<br>
> ><br>
> > Monotonic (ideally) time in an undefined domain, i.e. they're only<br>
> > meaningful on relation to each other.<br>
><br>
> What can you do with them ? For the use case that Giulio mentioned<br>
> (double-click detection), I'd need to know at least if the difference<br>
> between two times is seconds or milliseconds or microseconds...<br>
<br>
</div>The protocol needs to specify the unit. It can't be dependent on the device<br>
driver, that makes no sense. If it's in milliseconds, it will overflow every<br>
49.7 days. If it's microseconds, it will overflow every 71.6 minutes.<br>
<br>
It also needs to specify which timestamps are in the same time domain. Can two<br>
timestamps be compared to each other only if:<br>
<br>
- they are in the same input device (same mouse, same keyboard), but not<br>
across devices<br>
- they are in the same seat, but not across seats<br>
- they are in input event messages, but not other types of messages that<br>
carry timestamps<br>
- no restriction<br>
<br>
For example, imagine the case of trying to ensure that a Ctrl key was pressed<br>
before a mouse click happened, after the events were plucked out of the event<br>
stream.<br>
<br>
Or is there another, recommended way of doing that, such as by using the<br>
serials?<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Thiago Macieira - thiago.macieira (AT) <a href="http://intel.com" target="_blank">intel.com</a><br>
Software Architect - Intel Open Source Technology Center<br>
</font></span><br>_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
<br></blockquote></div><br></div></div>