Deleted Added
full compact
time.9 (79538) time.9 (79727)
1.\" $NetBSD: time.9,v 1.1 1995/11/25 21:24:53 perry Exp $
2.\"
3.\" Copyright (c) 1994 Christopher G. Demetriou
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 15 unchanged lines hidden (view full) ---

24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
1.\" $NetBSD: time.9,v 1.1 1995/11/25 21:24:53 perry Exp $
2.\"
3.\" Copyright (c) 1994 Christopher G. Demetriou
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:

--- 15 unchanged lines hidden (view full) ---

24.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31.\"
32.\" $FreeBSD: head/share/man/man9/time.9 79538 2001-07-10 15:31:11Z ru $
32.\" $FreeBSD: head/share/man/man9/time.9 79727 2001-07-14 19:41:16Z schweikh $
33.\"
34.Dd March 22, 1997
35.Dt TIME 9
36.Os
37.Sh NAME
38.Nm boottime ,
39.Nm mono_time ,
40.Nm runtime ,

--- 29 unchanged lines hidden (view full) ---

70at system boot, and is updated when the system time is adjusted
71with
72.Xr settimeofday 2 .
73.Pp
74The
75.Va runtime
76variable holds the time that the system switched to the
77current process.
33.\"
34.Dd March 22, 1997
35.Dt TIME 9
36.Os
37.Sh NAME
38.Nm boottime ,
39.Nm mono_time ,
40.Nm runtime ,

--- 29 unchanged lines hidden (view full) ---

70at system boot, and is updated when the system time is adjusted
71with
72.Xr settimeofday 2 .
73.Pp
74The
75.Va runtime
76variable holds the time that the system switched to the
77current process.
78It is set after each context switch,
78It is set after each context switch,
79and is updated when the system time is adjusted with
80.Xr settimeofday 2 .
81Because
82.Va runtime
83is used for system accounting, it is set with the high-resolution
84.Xr microtime 9
85function, rather than being copied from
86.Va time .

--- 31 unchanged lines hidden (view full) ---

118.Va runtime
119variables may be read and written without special precautions.
120.Pp
121It should be noted that due to the differences in how the time values
122returned by
123.Xr gettime 9
124and
125.Xr microtime 9
79and is updated when the system time is adjusted with
80.Xr settimeofday 2 .
81Because
82.Va runtime
83is used for system accounting, it is set with the high-resolution
84.Xr microtime 9
85function, rather than being copied from
86.Va time .

--- 31 unchanged lines hidden (view full) ---

118.Va runtime
119variables may be read and written without special precautions.
120.Pp
121It should be noted that due to the differences in how the time values
122returned by
123.Xr gettime 9
124and
125.Xr microtime 9
126are updated, comparing the results of the two routines
126are updated, comparing the results of the two routines
127may result in a time value that appears to go backwards.
128This can be avoided by consistently using one function or the other
129for use in any given context.
130.Sh SEE ALSO
131.Xr settimeofday 2 ,
132.Xr gettime 9 ,
133.\" .Xr hardclock 9 ,
134.\" .Xr hz 9 ,
135.Xr inittodr 9 ,
136.Xr microtime 9
137.Sh BUGS
138The notion of having a single
139.Va runtime
140variable obviously would not be appropriate in multiprocessor systems.
127may result in a time value that appears to go backwards.
128This can be avoided by consistently using one function or the other
129for use in any given context.
130.Sh SEE ALSO
131.Xr settimeofday 2 ,
132.Xr gettime 9 ,
133.\" .Xr hardclock 9 ,
134.\" .Xr hz 9 ,
135.Xr inittodr 9 ,
136.Xr microtime 9
137.Sh BUGS
138The notion of having a single
139.Va runtime
140variable obviously would not be appropriate in multiprocessor systems.