Robert Elz <k...@munnari.oz.au> 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.

Jörg

-- 
 EMail:jo...@schily.net                    (home) Jörg Schilling D-13353 Berlin
    joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'

Reply via email to