Robert Elz <> wrote:

> If yu can deal with timespec's instead of timeval's (and you really should)
> you can easily
>       #define gettimeofday(t, trash)  glock_gettime(CLOCK_REALTIME, (t))
> and barely notice the difference.   If you need timevals, it is not hard
> to convert.

if you need timevals, use gettimeofday().

Note that gettimeofday() is much faster than glock_gettime(CLOCK_REALTIME, tp)
on Solaris as gettimeofday() uses a fasttrap kernel interface.

BTW: On Solaris, you could use: clock_gettime(__CLOCK_REALTIME0, tp), to get
a fasttrap as well.


--                    (home) Jörg Schilling D-13353 Berlin (work) Blog:

Reply via email to