OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [doc/] [posix_users/] [clock.t] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
@c
2
@c COPYRIGHT (c) 1988-2002.
3
@c On-Line Applications Research Corporation (OAR).
4
@c All rights reserved.
5
@c
6
@c clock.t,v 1.6 2002/01/17 21:47:45 joel Exp
7
@c
8
 
9
@chapter Clock Manager
10
 
11
@section Introduction
12
 
13
The clock manager ...
14
 
15
The directives provided by the clock manager are:
16
 
17
@itemize @bullet
18
@item @code{clock_gettime} - Obtain Time of Day
19
@item @code{clock_settime} - Set Time of Day
20
@item @code{clock_getres} - Get Clock Resolution
21
@item @code{sleep} - Delay Process Execution
22
@item @code{nanosleep} - Delay with High Resolution
23
@item @code{gettimeofday} - Get the Time of Day
24
@item @code{time} - Get time in seconds
25
@end itemize
26
 
27
@section Background
28
 
29
There is currently no text in this section.
30
 
31
@section Operations
32
 
33
There is currently no text in this section.
34
 
35
@section Directives
36
 
37
This section details the clock manager's directives.
38
A subsection is dedicated to each of this manager's directives
39
and describes the calling sequence, related constants, usage,
40
and status codes.
41
 
42
@subsection clock_gettime -Obtain Time of Day
43
 
44
@findex clock_gettime
45
@cindex obtain time of day
46
 
47
@subheading CALLING SEQUENCE:
48
 
49
@example
50
#include 
51
 
52
int clock_gettime(
53
  clockid_t        clock_id,
54
  struct timespec *tp
55
);
56
@end example
57
 
58
@subheading STATUS CODES:
59
 
60
On error, this routine returns -1 and sets errno to one of the following:
61
 
62
@table @b
63
@item EINVAL
64
The tp pointer parameter is invalid.
65
 
66
@item EINVAL
67
The clock_id specified is invalid.
68
@end table
69
 
70
@subheading DESCRIPTION:
71
 
72
@subheading NOTES:
73
 
74
NONE
75
 
76
@c
77
@c
78
@c
79
@page
80
@subsection clock_settime - Set Time of Day
81
 
82
@findex clock_settime
83
@cindex  set time of day
84
 
85
@subheading CALLING SEQUENCE:
86
 
87
@example
88
#include 
89
 
90
int clock_settime(
91
  clockid_t              clock_id,
92
  const struct timespec *tp
93
);
94
@end example
95
 
96
@subheading STATUS CODES:
97
 
98
On error, this routine returns -1 and sets errno to one of the following:
99
 
100
@table @b
101
@item EINVAL
102
The tp pointer parameter is invalid.
103
 
104
@item EINVAL
105
The clock_id specified is invalid.
106
 
107
@item EINVAL
108
The contents of the tp structure are invalid.
109
 
110
@end table
111
 
112
@subheading DESCRIPTION:
113
 
114
@subheading NOTES:
115
 
116
NONE
117
 
118
@c
119
@c
120
@c
121
@page
122
@subsection clock_getres - Get Clock Resolution
123
 
124
@findex clock_getres
125
@cindex  get clock resolution
126
 
127
@subheading CALLING SEQUENCE:
128
 
129
@example
130
#include 
131
 
132
int clock_getres(
133
  clockid_t        clock_id,
134
  struct timespec *res
135
);
136
@end example
137
 
138
@subheading STATUS CODES:
139
 
140
On error, this routine returns -1 and sets errno to one of the following:
141
 
142
@table @b
143
@item EINVAL
144
The res pointer parameter is invalid.
145
 
146
@item EINVAL
147
The clock_id specified is invalid.
148
 
149
@end table
150
 
151
@subheading DESCRIPTION:
152
 
153
@subheading NOTES:
154
 
155
If res is NULL, then the resolution is not returned.
156
 
157
@c
158
@c
159
@c
160
@page
161
@subsection sleep - Delay Process Execution
162
 
163
@findex sleep
164
@cindex  delay process execution
165
 
166
@subheading CALLING SEQUENCE:
167
 
168
@example
169
#include 
170
 
171
unsigned int sleep(
172
  unsigned int seconds
173
);
174
@end example
175
 
176
@subheading STATUS CODES:
177
 
178
This routine returns the number of unslept seconds.
179
 
180
@subheading DESCRIPTION:
181
 
182
The @code{sleep()} function delays the calling thread by the specified
183
number of @code{seconds}.
184
 
185
@subheading NOTES:
186
 
187
This call is interruptible by a signal.
188
 
189
@c
190
@c
191
@c
192
@page
193
@subsection nanosleep - Delay with High Resolution
194
 
195
@findex nanosleep
196
@cindex  delay with high resolution
197
 
198
@subheading CALLING SEQUENCE:
199
 
200
@example
201
#include 
202
 
203
int nanosleep(
204
  const struct timespec *rqtp,
205
  struct timespec       *rmtp
206
);
207
@end example
208
 
209
@subheading STATUS CODES:
210
 
211
On error, this routine returns -1 and sets errno to one of the following:
212
 
213
@table @b
214
@item EINTR
215
The routine was interrupted by a signal.
216
 
217
@item EAGAIN
218
The requested sleep period specified negative seconds or nanoseconds.
219
 
220
@item EINVAL
221
The requested sleep period specified an invalid number for the nanoseconds
222
field.
223
 
224
@end table
225
 
226
@subheading DESCRIPTION:
227
 
228
@subheading NOTES:
229
 
230
This call is interruptible by a signal.
231
 
232
@c
233
@c
234
@c
235
@page
236
@subsection gettimeofday - Get the Time of Day
237
 
238
@findex gettimeofday
239
@cindex  get the time of day
240
 
241
@subheading CALLING SEQUENCE:
242
 
243
@example
244
#include 
245
#include 
246
 
247
int gettimeofday(
248
  struct timeval  *tp,
249
  struct timezone *tzp
250
);
251
@end example
252
 
253
@subheading STATUS CODES:
254
 
255
On error, this routine returns -1 and sets @code{errno} as appropriate.
256
 
257
@table @b
258
@item EPERM
259
@code{settimeofdat} is called by someone other than the superuser.
260
 
261
@item EINVAL
262
Timezone (or something else) is invalid.
263
 
264
@item EFAULT
265
One of @code{tv} or @code{tz} pointed outside your accessible address
266
space
267
 
268
@end table
269
 
270
@subheading DESCRIPTION:
271
 
272
This routine returns the current time of day in the @code{tp} structure.
273
 
274
@subheading NOTES:
275
 
276
Currently, the timezone information is not supported. The @code{tzp}
277
argument is ignored.
278
 
279
@c
280
@c
281
@c
282
@page
283
@subsection time - Get time in seconds
284
 
285
@findex time
286
@cindex  get time in seconds
287
 
288
@subheading CALLING SEQUENCE:
289
 
290
@example
291
#include 
292
 
293
int time(
294
  time_t *tloc
295
);
296
@end example
297
 
298
@subheading STATUS CODES:
299
 
300
This routine returns the number of seconds since the Epoch.
301
 
302
@subheading DESCRIPTION:
303
 
304
@code{time} returns the time since 00:00:00 GMT, January 1, 1970,
305
measured in seconds
306
 
307
If @code{tloc} in non null, the return value is also stored in the
308
memory pointed to by @code{t}.
309
 
310
@subheading NOTES:
311
 
312
NONE
313
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.