1 | @c |
---|
2 | @c COPYRIGHT (c) 1996. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @ifinfo |
---|
10 | @node Clock Manager, Clock Manager Introduction, pthread_getspecific, Top |
---|
11 | @end ifinfo |
---|
12 | @chapter Clock Manager |
---|
13 | @ifinfo |
---|
14 | @menu |
---|
15 | * Clock Manager Introduction:: |
---|
16 | * Clock Manager Background:: |
---|
17 | * Clock Manager Operations:: |
---|
18 | * Clock Manager Directives:: |
---|
19 | @end menu |
---|
20 | @end ifinfo |
---|
21 | |
---|
22 | @ifinfo |
---|
23 | @node Clock Manager Introduction, Clock Manager Background, Clock Manager, Clock Manager |
---|
24 | @end ifinfo |
---|
25 | @section Introduction |
---|
26 | |
---|
27 | The clock manager ... |
---|
28 | |
---|
29 | The directives provided by the clock manager are: |
---|
30 | |
---|
31 | @itemize @bullet |
---|
32 | @item @code{clock_gettime} - |
---|
33 | @item @code{clock_settime} - |
---|
34 | @item @code{clock_getres} - |
---|
35 | @item @code{nanosleep} - |
---|
36 | @item @code{time} - |
---|
37 | @end itemize |
---|
38 | |
---|
39 | @ifinfo |
---|
40 | @node Clock Manager Background, Clock Manager Operations, Clock Manager Introduction, Clock Manager |
---|
41 | @end ifinfo |
---|
42 | @section Background |
---|
43 | |
---|
44 | @ifinfo |
---|
45 | @node Clock Manager Operations, Clock Manager Directives, Clock Manager Background, Clock Manager |
---|
46 | @end ifinfo |
---|
47 | @section Operations |
---|
48 | |
---|
49 | @ifinfo |
---|
50 | @node Clock Manager Directives, clock_gettime, Clock Manager Operations, Clock Manager |
---|
51 | @end ifinfo |
---|
52 | @section Directives |
---|
53 | @ifinfo |
---|
54 | @menu |
---|
55 | * clock_gettime:: |
---|
56 | * clock_settime:: |
---|
57 | * clock_getres:: |
---|
58 | * sleep:: |
---|
59 | * nanosleep:: |
---|
60 | * time:: |
---|
61 | @end menu |
---|
62 | @end ifinfo |
---|
63 | |
---|
64 | This section details the clock manager's directives. |
---|
65 | A subsection is dedicated to each of this manager's directives |
---|
66 | and describes the calling sequence, related constants, usage, |
---|
67 | and status codes. |
---|
68 | |
---|
69 | @page |
---|
70 | @ifinfo |
---|
71 | @node clock_gettime, clock_settime, Clock Manager Directives, Clock Manager Directives |
---|
72 | @end ifinfo |
---|
73 | @subsection clock_gettime |
---|
74 | |
---|
75 | @subheading CALLING SEQUENCE: |
---|
76 | |
---|
77 | @example |
---|
78 | #include <time.h> |
---|
79 | |
---|
80 | int clock_gettime( |
---|
81 | clockid_t clock_id, |
---|
82 | struct timespec *tp |
---|
83 | ); |
---|
84 | @end example |
---|
85 | |
---|
86 | @subheading STATUS CODES: |
---|
87 | |
---|
88 | On error, this routine returns -1 and sets errno to one of the following: |
---|
89 | |
---|
90 | @table @b |
---|
91 | @item EINVAL |
---|
92 | The tp pointer parameter is invalid. |
---|
93 | |
---|
94 | @item EINVAL |
---|
95 | The clock_id specified is invalid. |
---|
96 | @end table |
---|
97 | |
---|
98 | @subheading DESCRIPTION: |
---|
99 | |
---|
100 | @subheading NOTES: |
---|
101 | |
---|
102 | @page |
---|
103 | @ifinfo |
---|
104 | @node clock_settime, clock_getres, clock_gettime, Clock Manager Directives |
---|
105 | @end ifinfo |
---|
106 | @subsection clock_settime |
---|
107 | |
---|
108 | @subheading CALLING SEQUENCE: |
---|
109 | |
---|
110 | @example |
---|
111 | #include <time.h> |
---|
112 | |
---|
113 | int clock_settime( |
---|
114 | clockid_t clock_id, |
---|
115 | const struct timespec *tp |
---|
116 | ); |
---|
117 | @end example |
---|
118 | |
---|
119 | @subheading STATUS CODES: |
---|
120 | |
---|
121 | On error, this routine returns -1 and sets errno to one of the following: |
---|
122 | |
---|
123 | @table @b |
---|
124 | @item EINVAL |
---|
125 | The tp pointer parameter is invalid. |
---|
126 | |
---|
127 | @item EINVAL |
---|
128 | The clock_id specified is invalid. |
---|
129 | |
---|
130 | @item EINVAL |
---|
131 | The contents of the tp structure are invalid. |
---|
132 | |
---|
133 | @end table |
---|
134 | |
---|
135 | @subheading DESCRIPTION: |
---|
136 | |
---|
137 | @subheading NOTES: |
---|
138 | |
---|
139 | @page |
---|
140 | @ifinfo |
---|
141 | @node clock_getres, sleep, clock_settime, Clock Manager Directives |
---|
142 | @end ifinfo |
---|
143 | @subsection clock_getres |
---|
144 | |
---|
145 | @subheading CALLING SEQUENCE: |
---|
146 | |
---|
147 | @example |
---|
148 | #include <time.h> |
---|
149 | |
---|
150 | int clock_getres( |
---|
151 | clockid_t clock_id, |
---|
152 | struct timespec *res |
---|
153 | ); |
---|
154 | @end example |
---|
155 | |
---|
156 | @subheading STATUS CODES: |
---|
157 | |
---|
158 | On error, this routine returns -1 and sets errno to one of the following: |
---|
159 | |
---|
160 | @table @b |
---|
161 | @item EINVAL |
---|
162 | The res pointer parameter is invalid. |
---|
163 | |
---|
164 | @item EINVAL |
---|
165 | The clock_id specified is invalid. |
---|
166 | |
---|
167 | @end table |
---|
168 | |
---|
169 | @subheading DESCRIPTION: |
---|
170 | |
---|
171 | @subheading NOTES: |
---|
172 | |
---|
173 | If res is NULL, then the resolution is not returned. |
---|
174 | |
---|
175 | @page |
---|
176 | @ifinfo |
---|
177 | @node sleep, nanosleep, clock_getres, Clock Manager Directives |
---|
178 | @end ifinfo |
---|
179 | @subsection sleep |
---|
180 | |
---|
181 | @subheading CALLING SEQUENCE: |
---|
182 | |
---|
183 | @example |
---|
184 | #include <time.h> |
---|
185 | |
---|
186 | unsigned int sleep( |
---|
187 | unsigned int seconds |
---|
188 | ); |
---|
189 | @end example |
---|
190 | |
---|
191 | @subheading STATUS CODES: |
---|
192 | |
---|
193 | This routine returns the number of unslept seconds. |
---|
194 | |
---|
195 | @subheading DESCRIPTION: |
---|
196 | |
---|
197 | @subheading NOTES: |
---|
198 | |
---|
199 | This call is interruptible by a signal. |
---|
200 | |
---|
201 | @page |
---|
202 | @ifinfo |
---|
203 | @node nanosleep, time, sleep, Clock Manager Directives |
---|
204 | @end ifinfo |
---|
205 | @subsection nanosleep |
---|
206 | |
---|
207 | @subheading CALLING SEQUENCE: |
---|
208 | |
---|
209 | @example |
---|
210 | #include <time.h> |
---|
211 | |
---|
212 | int nanosleep( |
---|
213 | const struct timespec *rqtp, |
---|
214 | struct timespec *rmtp |
---|
215 | ); |
---|
216 | @end example |
---|
217 | |
---|
218 | @subheading STATUS CODES: |
---|
219 | |
---|
220 | On error, this routine returns -1 and sets errno to one of the following: |
---|
221 | |
---|
222 | @table @b |
---|
223 | @item EINTR |
---|
224 | The routine was interrupted by a signal. |
---|
225 | |
---|
226 | @item EAGAIN |
---|
227 | The requested sleep period specified negative seconds or nanoseconds. |
---|
228 | |
---|
229 | @item EINVAL |
---|
230 | The requested sleep period specified an invalid number for the nanoseconds |
---|
231 | field. |
---|
232 | |
---|
233 | @end table |
---|
234 | |
---|
235 | @subheading DESCRIPTION: |
---|
236 | |
---|
237 | @subheading NOTES: |
---|
238 | |
---|
239 | This call is interruptible by a signal. |
---|
240 | |
---|
241 | @page |
---|
242 | @ifinfo |
---|
243 | @node time, Scheduler Manager, nanosleep, Clock Manager Directives |
---|
244 | @end ifinfo |
---|
245 | @subsection nanosleep |
---|
246 | |
---|
247 | @subheading time SEQUENCE: |
---|
248 | |
---|
249 | @example |
---|
250 | #include <time.h> |
---|
251 | |
---|
252 | int time( |
---|
253 | time_t *tloc |
---|
254 | ); |
---|
255 | @end example |
---|
256 | |
---|
257 | @subheading STATUS CODES: |
---|
258 | |
---|
259 | This routine returns the number of seconds since the Epoch. |
---|
260 | |
---|
261 | @subheading DESCRIPTION: |
---|
262 | |
---|
263 | @subheading NOTES: |
---|
264 | |
---|