*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> getmicrouptime (9)              
Title
Content
Arch
Section
 

MICROTIME(9)

Contents


NAME    [Toc]    [Back]

     microtime,   getmicrotime,   microuptime,    getmicrouptime,
nanotime,
     getnanotime, nanouptime, getnanouptime, bintime, getbintime,
binuptime,
     getbinuptime - system clock

SYNOPSIS    [Toc]    [Back]

     #include <sys/time.h>

     void
     microtime(struct timeval *tv);

     void
     getmicrotime(struct timeval *tv);

     void
     microuptime(struct timeval *tv);

     void
     getmicrouptime(struct timeval *tv);

     void
     nanotime(struct timespec *tv);

     void
     getnanotime(struct timespec *tv);

     void
     nanouptime(struct timespec *tv);

     void
     getnanouptime(struct timespec *tv);

     void
     bintime(struct bintime *tv);

     void
     getbintime(struct bintime *tv);

     void
     binuptime(struct bintime *tv);

     void
     getbinuptime(struct bintime *tv);

DESCRIPTION    [Toc]    [Back]

     This family of functions return the system clock in  various
different
     formats.   The functions with the "uptime" suffix return the
monotonically
     increasing time since boot.  The functions without "up"  return UTC time.
     The various formats for the result are specified with:

           bin    result in struct bintime containing seconds and
64-bit fractions
 of seconds.

           nano   result in struct  timespec  containing  seconds
and nanoseconds

           micro  result in struct timeval containing seconds and
microseconds

     The functions with the "get" prefix return  a  less  precise
result, but
     much  faster.   They  should be used where a precision of 10
msec is acceptable
 and where performance is critical.  The functions without the "get"
     prefix return the best timestamp that can be produced in the
given format.

SEE ALSO    [Toc]    [Back]

      
      
     settimeofday(2), hardclock(9), hz(9), inittodr(9), time(9)

CODE REFERENCES    [Toc]    [Back]

     The implementation of these functions is partly machine  dependent, but
     the bulk of the code is in the file sys/kern/kern_clock.c.

OpenBSD      3.6                       September     14,     1998
[ Back ]
 Similar pages
Name OS Title
setclock Tru64 Set value of system-wide clock
hz NetBSD system clock frequency
microtime NetBSD realtime system clock
cron Tru64 The system clock daemon
hardclock OpenBSD real-time system clock
getclock Tru64 Get current value of system-wide clock
stime Tru64 Set the system-wide time-of-day clock
resettodr FreeBSD set battery-backed clock from system time
adjtime HP-UX correct the time to synchronize the system clock
mstohz NetBSD convert milliseconds to system clock ticks
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service