HARDCLOCK(9)                 OpenBSD Kernel Manual                HARDCLOCK(9)

NAME
     hardclock - real-time system clock

SYNOPSIS
     #include <sys/systm.h>

     void
     hardclock(struct clockframe *frame);

DESCRIPTION
     hardclock() implements the the real-time system clock, interrupting hz(9)
     times a second.  The argument frame is an opaque, machine dependant
     structure that encapsulates the previous machine state.

     hardclock() performs a variety of time related housekeeping tasks, such
     as

           o   If the current process has virtual or profiling interval
               timers, update the timers and deliver appropriate signals.

           o   If there is no separate statistics clock, execute statclock(9).

           o   Increment the time of day, implementing any adjustments re-
               quested by adjtime(2) or required as a result of running a ntp
               daemon or other configured external clock.

           o   Update the real-time timeout queue, calling softclock() direct-
               ly if the current interrupt priority is low enough.

SEE ALSO
     adjtime(2), hz(9), microtime(9), spl(9), time(9), timeout(9)

CODE REFERENCES
     hardclock() is implemented in the file sys/kern/kern_clock.c.

OpenBSD 3.0                      Jul 14, 2001                                1
