12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

TIME_SECOND (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> TIME_SECOND (9)<strong>NAME</strong>boottime, time_second, time_uptime —system time variablesSYNOPSISextern struct timeval boottime;extern time_t time_uptime;extern time_t time_second;DESCRIPTIONThe time_second variable is the system’s “wall time” clock. It is set at boot by inittodr(9), and isupdated by the settimeofday(2) system call and by periodic clock interrupts.The boottime variable holds the system boot time. It is set from time at system boot, and is updated when thesystem time is adjusted with settimeofday(2).The time_uptime variable is a monotonically increasing system clock. It is set from time_second at boot, andis updated by the periodic timer interrupt. (It is not updated by settimeofday(2).)All of these variables contain times expressed in seconds and microseconds since midnight (0 hour), January1, 1970.Clock interrupts should be blocked when reading or writing time_second or time_uptime, because those variablesare updated by hardclock(). boottime and runtime may be read and written without special precautions.SEE ALSOsettimeofday(2), hardclock(9), hz(9), inittodr(9), microtime(9)<strong>NetBSD</strong> 3.0 September 6, 2006 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!