Problem with function GetTimeInMillis
Alan Coopersmith
Alan.Coopersmith at Sun.COM
Sun Aug 23 07:06:28 PDT 2009
Elmar Krieger wrote:
> Unfortunately, the current time is returned by function GetTimeInMillis,
> and this function is private and not exported in the Xlibs for unknown
> reasons, so my application cannot call it.
Because it's in the Xserver, on the wrong side of the protocol from the
clients, and not defined by the protocol.
> This worked well, until some time ago, someone changed Xorg's
> GetTimeInMillis. It now reads...
> X_GETTIMEOFDAY(&tp);
Xorg actually now uses the POSIX clock routines on many platforms.
Since the time baseline isn't defined in the protocol, the
implementation can change, and has a couple times.
> Since I'm now screwed completely, you guys are my last hope...
> Does anyone have a clever idea what to do? Any tricky way to indirectly
> call GetTimeInMillis and deliver the result to my application? Or any
> more 'official' way to determine how long a mouse button has been
> pressed so far?
Record the current time when you get the initial event for comparison?
--
-Alan Coopersmith- alan.coopersmith at sun.com
Sun Microsystems, Inc. - X Window System Engineering
More information about the xorg-devel
mailing list