These pages were never updated for the timecounter changes. time.9 should move to time_second.9 as well.
Index: time.9 =================================================================== RCS file: /cvs/src/share/man/man9/time.9,v retrieving revision 1.11 diff -u -p -r1.11 time.9 --- time.9 31 May 2007 19:20:01 -0000 1.11 +++ time.9 2 Apr 2016 05:28:53 -0000 @@ -34,19 +34,15 @@ .Dt TIME 9 .Os .Sh NAME -.Nm boottime , -.Nm mono_time , -.Nm runtime , -.Nm time +.Nm time_second , +.Nm time_uptime .Nd system time variables .Sh SYNOPSIS -.Vt extern struct timeval boottime; -.Vt extern volatile struct timeval mono_time; -.Vt extern struct timeval runtime; -.Vt extern volatile struct timeval time; +.Vt extern volatile time_t time_second +.Vt extern volatile time_t time_uptime .Sh DESCRIPTION The -.Va time +.Va time_second variable is the system's .Dq wall time clock. @@ -56,65 +52,27 @@ and is updated by the .Xr settimeofday 2 system call and by periodic clock interrupts. .Pp -The -.Va boottime -variable holds the system boot time. -It is set from -.Va time -at system boot, and is updated when the system time is adjusted -with -.Xr settimeofday 2 . -.Pp -The -.Va runtime -variable holds the time that the system switched to the -current process. -It is set after each context switch, -and is updated when the system time is adjusted with -.Xr settimeofday 2 . -Because -.Va runtime -is used for system accounting, it is set with the high-resolution -.Xr microtime 9 -function, rather than being copied from -.Va time . .Pp The -.Va mono_time +.Va time_uptime variable is a monotonically increasing system clock. -It is set from -.Va time -at boot, and is updated by the periodic timer interrupt. +It is set at boot, and is updated by the periodic timer interrupt. (It is not updated by .Xr settimeofday 2 . ) .Pp All of these variables contain times -expressed in seconds and microseconds since midnight (0 hour), +expressed in seconds since midnight (0 hour), January 1, 1970. .Pp Clock interrupts should be blocked when reading or writing -.Va time +.Va time_second or -.Va mono_time , +.Va time_uptime , because those variables are updated by .Xr hardclock 9 . -.Va Boottime -and -.Va runtime -may be read and written without special precautions. .Sh SEE ALSO .Xr settimeofday 2 , .Xr hardclock 9 , .Xr hz 9 , .Xr inittodr 9 , .Xr microtime 9 -.Sh BUGS -.Va Runtime -should not be updated when the system time is -changed with -.Xr settimeofday 2 , -because it is used for resource accounting. -.Pp -The notion of having a single -.Va runtime -variable obviously won't be appropriate in multiprocessor systems. Index: resettodr.9 =================================================================== RCS file: /cvs/src/share/man/man9/resettodr.9,v retrieving revision 1.6 diff -u -p -r1.6 resettodr.9 --- resettodr.9 31 May 2007 19:20:01 -0000 1.6 +++ resettodr.9 2 Apr 2016 05:15:02 -0000 @@ -44,16 +44,10 @@ The .Fn resettodr function sets the system's battery backed clock based on the contents of the system -.Va time -variable. +.Va time_second +variable or a function such as +.Fn microtime . .Sh SEE ALSO .Xr inittodr 9 , +.Xr microtime 9 , .Xr time 9 -.Sh BUGS -On many systems, -.Fn resettodr -has to convert from -.Va time -to a time expressed in terms of year, month, day, hours, minutes, -and seconds. -Many of the implementations could share code, but do not. Index: inittodr.9 =================================================================== RCS file: /cvs/src/share/man/man9/inittodr.9,v retrieving revision 1.10 diff -u -p -r1.10 inittodr.9 --- inittodr.9 31 May 2007 19:20:00 -0000 1.10 +++ inittodr.9 2 Apr 2016 05:09:50 -0000 @@ -66,9 +66,9 @@ an arbitrary base (typically some time i will be used. .El .Pp -Once a system time has been determined, it is stored in the -.Va time -variable. +Once a system time has been determined, it is passed to the +.Fn tc_setclock +function. .Sh DIAGNOSTICS The .Fn inittodr @@ -91,14 +91,6 @@ time and the battery-backed clock's time .Xr resettodr 9 , .Xr time 9 .Sh BUGS -On many systems, -.Fn inittodr -has to convert from -a time expressed in terms of year, month, day, hours, minutes, -and seconds to -.Va time , -expressed in seconds. -Many of the implementations could share code, but do not. .Pp Each system's heuristics for picking the correct time are slightly different.
