2 .\" Copyright (c) 1996 Joerg Wunsch
4 .\" All rights reserved.
6 .\" This program is free software.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 .Nd various system timers
40 is not part of the application interface in
43 There are many different real and virtual (timekeeping) clocks with
44 different frequencies:
48 This is a real clock with frequency that happens to be 100.
49 It is not available to applications.
52 This is a real clock with frequency that happens to be 128.
53 It is not directly available to applications.
57 This is a virtual clock with a frequency that happens to be 128.
58 Its actual frequency is given by the macro
62 may be floating point.
67 It is feeble compared with
72 It is implemented by calling
74 and throwing away information and resolution.
78 This is a virtual clock with a frequency that happens to be 128.
79 Its actual frequency is given by the macro
81 (deprecated; do not use) and by
82 .Fn sysconf _SC_CLK_TCK
85 Note that its frequency may be different from
91 It is feeble compared with
98 It is implemented by calling
102 and throwing away information and resolution.
105 This is a real clock with frequency 1024.
111 Applications should determine its actual frequency using
113 or by reading it from the header in the profiling data file.
116 This is a real clock with a nominal frequency of 32768.
117 It is divided down to give the statistic clock and the profiling clock.
118 It is not available to applications.
120 The microseconds clock.
121 This is a virtual clock with frequency 1000000.
122 It is used for most timekeeping in
124 and is exported to applications in
130 This is the clock that should normally be used by
135 This is a real clock/timer with a nominal frequency of 1193182.
136 It has three independent time counters to be used.
137 It is divided down to give the scheduling clock.
138 It is not available to applications.
140 The TSC clock (64-bit register) on fifth-generation or later x86 systems.
141 This is a real clock with a frequency that is equivalent to the number of
142 cycles per second of the CPU(s).
143 Its frequency can be found using the
145 sysctl, if it is available.
146 It is used to interpolate between values of the scheduling clock.
147 It can be accessed using the
153 This is a real clock/timer with a nominal frequency of 3579545.
154 It is accessed via a 24 or 32 bit register.
155 Unlike the TSC clock, it maintains a constant tick rate even when the CPU
156 sleeps or its clock rate changes.
157 It is not available to applications.
162 is not 1000000 then the application is probably using the wrong clock.
165 .Xr clock_gettime 2 ,
175 This manual page was written by
177 after a description posted by