source: rtems/doc/new_chapters/clock.t @ 571a915

4.104.114.84.95
Last change on this file since 571a915 was 4ebb4862, checked in by Joel Sherrill <joel.sherrill@…>, on 08/01/98 at 15:49:38

Removed all node and menu information since this information is now
automatically generated.

Removed any attempts to link across chapter boundaries since the manual
is incomplete.

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