microtime, getmicrotime, nanotime, getnanotime -- get the current time
      #include <sys/time.h>
     void
     microtime(struct timeval *tv);
     void
     getmicrotime(struct timeval *tv);
     void
     nanotime(struct timespec *ts);
     void
     getnanotime(struct timespec *tsp);
     The microtime() and getmicrotime() functions store the system time as a
     struct timeval at the address specified by tv.  The nanotime() and
     getnanotime() functions perform the same utility, but record the time as
     a struct timespec instead.
     Microtime() and nanotime() always query the timecounter to return the
     current time as precisely as possible.  Whereas getmicrotime() and
     getnanotime() functions are abstractions which return a less precise, but
     faster to obtain, time.
     The intent of the getmicrotime() and getnanotime() functions is to
     enforce the user's preference for timer accuracy versus execution time.
     getmicrouptime(9), getnanouptime(9), microuptime(9), nanouptime(9),
     tvtohz(9)
     The microtime and nanotime functions first appeared in FreeBSD 3.0 but
     existed in other incarnations since 4.4BSD
     This manual page was written by Kelly Yancey <kbyanc@posi.net>.
FreeBSD 5.2.1			January 3, 2000 		 FreeBSD 5.2.1  [ Back ] |