boottime9
System time variables
Usage
#include <sys/time.h>
extern struct timeval boottime; extern struct time_t time_second; extern struct timeval time_uptime;
Overview
The boottime variable holds the system boot time.
The time_second variable is the system's “wall time” clock to the second.
The time_uptime variable is the number of seconds since boot.
The bintime(9), getbintime(9), microtime(9), getmicrotime(9), nanotime(9), and getnanotime(9) functions can be used to get the current time more accurately and in an atomic manner. Similarly, the The binuptime(9), getbinuptime(9), microuptime(9), getmicrouptime(9), nanouptime(9), and getnanouptime(9) functions can be used to get the time elapse since boot more accurately and in an atomic manner. The boottime variable may be read and written without special precautions.