summaryrefslogtreecommitdiffstats
path: root/share/man/man7/clocks.7
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-03-17 15:02:20 +0000
committerru <ru@FreeBSD.org>2002-03-17 15:02:20 +0000
commit69d6446a7fd15cf545cd9ded250aa87a8716cd1d (patch)
tree7e3b1bd0f9f78d48071bfa2d632323090cd1df9d /share/man/man7/clocks.7
parent8f54f13281f3a57702274407dcc864c6a8572008 (diff)
downloadFreeBSD-src-69d6446a7fd15cf545cd9ded250aa87a8716cd1d.zip
FreeBSD-src-69d6446a7fd15cf545cd9ded250aa87a8716cd1d.tar.gz
mdoc(7) police: tidy up.
Diffstat (limited to 'share/man/man7/clocks.7')
-rw-r--r--share/man/man7/clocks.793
1 files changed, 52 insertions, 41 deletions
diff --git a/share/man/man7/clocks.7 b/share/man/man7/clocks.7
index 5854273..b32967f 100644
--- a/share/man/man7/clocks.7
+++ b/share/man/man7/clocks.7
@@ -36,64 +36,71 @@
.Sh SYNOPSIS
.In time.h
.Sh DESCRIPTION
-.Ql HZ
+.Dv HZ
is not part of the application interface in
.Bx .
.Pp
There are many different real and virtual (timekeeping) clocks with
different frequencies:
-.Bl -bullet -offset XXX
+.Bl -bullet
.It
-The scheduling clock. This is a real clock with frequency that
-happens to be 100. It isn't available to applications.
+The scheduling clock.
+This is a real clock with frequency that happens to be 100.
+It is not available to applications.
.It
-The statistics clock. This is a real clock with frequency that
-happens to be 128. It isn't directly available to applications.
+The statistics clock.
+This is a real clock with frequency that happens to be 128.
+It is not directly available to applications.
.It
The clock reported by
.Xr clock 3 .
-This is a virtual clock with a frequency that happens to be 128. Its
-actual frequency is given by the macro
+This is a virtual clock with a frequency that happens to be 128.
+Its actual frequency is given by the macro
.Dv CLOCKS_PER_SEC .
Note that
.Dv CLOCKS_PER_SEC
-may be floating point. Don't use
-.Fn clock
+may be floating point.
+Do not use
+.Xr clock 3
in new programs under
.Fx .
It is feeble compared with
.Xr getrusage 2 .
-It is provided for ANSI conformance. It is implemented by calling
-.Fn getrusage
+It is provided for \*[Ai]
+conformance.
+It is implemented by calling
+.Xr getrusage 2
and throwing away information and resolution.
.It
The clock reported by
.Xr times 3 .
-This is a virtual clock with a frequency that happens to be 128. Its
-actual frequency is given by the macro
+This is a virtual clock with a frequency that happens to be 128.
+Its actual frequency is given by the macro
.Dv CLK_TCK
-(deprecated; don't use) and by
+(deprecated; do not use) and by
.Fn sysconf SC_CLK_TCK
and by
.Xr sysctl 3 .
Note that its frequency may be different from
.Dv CLOCKS_PER_SEC .
-Don't use
+Do not use
.Xr times 3
in new programs under
.Fx .
It is feeble compared with
.Xr gettimeofday 2
together with
-.Fn getrusage .
-It is provided for POSIX
-conformance. It is implemented by calling
-.Fn gettimeofday
+.Xr getrusage 2 .
+It is provided for \*[Px]
+conformance.
+It is implemented by calling
+.Xr gettimeofday 2
and
-.Fn getrusage
+.Xr getrusage 2
and throwing away information and resolution.
.It
-The profiling clock. This is a real clock with frequency 1024.
+The profiling clock.
+This is a real clock with frequency 1024.
It is used mainly by
.Xr moncontrol 3 ,
.Xr kgmon 8
@@ -103,43 +110,47 @@ Applications should determine its actual frequency using
.Xr sysctl 3
or by reading it from the header in the profiling data file.
.It
-The mc146818a clock. This is a real clock with a nominal frequency of
-32768. It is divided down to give the statistic clock and the profiling
-clock. It isn't available to applications.
+The mc146818a clock.
+This is a real clock with a nominal frequency of 32768.
+It is divided down to give the statistic clock and the profiling clock.
+It is not available to applications.
.It
-The microseconds clock. This is a virtual clock with frequency
-1000000. It is used for most timekeeping in
+The microseconds clock.
+This is a virtual clock with frequency 1000000.
+It is used for most timekeeping in
.Bx
-and is exported
-to applications in
+and is exported to applications in
.Xr getrusage 2 ,
.Xr gettimeofday 2 ,
.Xr select 2 ,
.Xr getitimer 2 ,
-etc... This is the clock that should normally be used
-by
+etc.
+This is the clock that should normally be used by
.Bx
applications.
.It
-The i8254 clock. This is a real clock/timer with a nominal frequency of
-1193182. It has three independent time counters to be used.
-It is divided down to give the scheduling clock. It isn't
-available to applications.
+The i8254 clock.
+This is a real clock/timer with a nominal frequency of 1193182.
+It has three independent time counters to be used.
+It is divided down to give the scheduling clock.
+It is not available to applications.
.It
The TSC clock (64-bit register) on fifth-generation or later x86 systems.
This is a real clock with a frequency that is equivalent to the number of
cycles per second of the CPU(s).
-Its frequency can be found using the sysctl
-.Sy machdep.tsc_freq ,
-if it is available.
+Its frequency can be found using the
+.Va machdep.tsc_freq
+sysctl, if it is available.
It is used to interpolate between values of the scheduling clock.
-It can be accessed using the PMIOTSTAMP request of
+It can be accessed using the
+.Dv PMIOTSTAMP
+request of
.Xr perfmon 4 .
.El
.Pp
Summary: if
-.Ql HZ
-isn't 1000000 then the application is probably using the wrong clock.
+.Dv HZ
+is not 1000000 then the application is probably using the wrong clock.
.Sh SEE ALSO
.Xr gprof 1 ,
.Xr getitimer 2 ,
OpenPOWER on IntegriCloud