Lines Matching +full:at +full:- +full:the +full:- +full:time
4 .\" The Regents of the University of California. All rights reserved.
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .Nd get or set the time
49 function reads the given
59 or any of the following constants:
60 .Bl -tag -width CLOCK_MONOTONIC
62 The Coordinated Universal Time
65 Its absolute value is the time elapsed since
67 .Pq the Epoch .
77 The clock begins at an undefined positive point and advances continuously.
80 Its absolute value is the time elapsed since the system booted.
81 The clock begins at zero and advances continuously.
84 Its absolute value is the time elapsed since the system booted
85 less any time the system was suspended.
86 The clock begins at zero and advances while the system is not suspended.
89 Its absolute value begins at zero and advances while the calling process
93 Its absolute value begins at zero and advances while the calling thread
99 function sets the given
101 to the absolute value
103 Only the
105 clock may be set and only the superuser may set it.
106 If the system
108 is 2 or greater, the time may only be advanced.
114 function retrieves the resolution of the given
121 .Pf non- Dv NULL .
124 may be any of the clocks accepted by
136 .Bd -literal -offset indent
143 .Rv -std
145 Use the
147 clock to determine the time of day.
152 to produce a human-readable string:
153 .Bd -literal -offset indent
164 printf("%s (%lld.%09ld seconds since the Epoch)\\n",
168 Use the
170 clock to measure elapsed time.
176 .Bd -literal -offset indent
192 Use the
196 clocks to measure CPU time instead of elapsed time:
197 .Bd -literal -offset indent
207 printf("CPU time: %lld.%09lds\\n",
211 How much time has elapsed since the system booted?
212 Has the system been suspended for any of that time?
213 .Bd -literal -offset indent
226 Set the
229 .Bd -literal -offset indent
242 if (ts.tv_sec == -1)
245 if (clock_settime(CLOCK_REALTIME, &ts) == -1)
254 .Bl -tag -width Er
268 may return the following errors:
269 .Bl -tag -width Er
271 A user other than the superuser attempted to set the time.
283 specifies a value outside the range of the given
295 .Xr time 3 ,
305 .St -p1003.1-2008 .
318 functions and the
321 .St -p1003.1b-93
328 IEEE Std 1003.1j-2000
338 IEEE Std 1003.1d-1999