I had a quick look at the usage of gettimeofday in mesa, and apparently
it never is used for accessing the wall time, but instead for timeouts
like in the pb_bufmgr_cache, or for benchmarks elsewhere.
So my thought was that it might make sense to replace it, if available,
with POSIX clock_gettime and a cheaper monotonic clock with an
unspecified starting point.
Also according to the manpage of gettimeofday,
Googling a bit I found an interesting patch on the Xorg-devel mailing list,
http://lists.x.org/pipermail/xorg-de...st/012483.html
which points to a Linux patch,
http://marc.info/?l=linux-kernel&m=125073483507611&w=2
Accordingly I replaced gettimeofday in mesas's os_time_get(), src/gallium/auxiliary/os/os_time.c
with clock_gettime and CLOCK_REALTIME_COARSE.
It's working nicely, but the problem is that I don't see a significant difference
