protocol questions
Kristian Høgsberg
hoegsberg at gmail.com
Mon Apr 1 18:53:26 PDT 2013
On Sat, Mar 30, 2013 at 06:17:30PM -0700, Thiago Macieira wrote:
> On sábado, 30 de março de 2013 17.52.33, Nick Kisialiou wrote:
> > What about "long int" type to store the time stamps? Even in microseconds
> > it will take longer than 100 years to overflow 2^63.
>
> That requires changing the protocol.
Overflow also isn't a problem at all. The timestamps are carefully
uint32_t so you can do
if (click_time_2 - click_time_1 < double_click_time)
/* double click */
and get the right (well defined) result even in the face of either or
the click timestamps wrapping around.
Kristian
More information about the wayland-devel
mailing list