[PATCH] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Aug 24 01:17:17 PDT 2010


ykzhao, le Tue 24 Aug 2010 15:55:41 +0800, a écrit :
>     b. CLOCK_MONOTONIC_COARSE is already defined. But the corresponding
> id is not 6.

That won't happen on Linux, the value is now cast into stone. That's why
it's safe to use

#ifdef __linux__
# ifndef CLOCK_MONOTONIC_COARSE 
#  define CLOCK_MONOTONIC_COARSE 6
# endif
#endif

On other OSes that may happen (that's the original Nack against your
patch), thus the #ifdef __linux__ above is necessary.

Samuel


More information about the xorg-devel mailing list