OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / clock_nanosleep.2
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
25 .\"         all rights reserved.
26 .\" Translated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.04
27 .\" 
28 .TH CLOCK_NANOSLEEP 2 2008-07-09 "Linux" "Linux Programmer's Manual"
29 .\"O .SH NAME
30 .SH Ì¾Á°
31 .\"O clock_nanosleep \- high-resolution sleep with specifiable clock
32 clock_nanosleep \- »ØÄꤷ¤¿¥¯¥í¥Ã¥¯¤Ç¤Î¹âÀºÅ٤ʼ¹ÔÄä»ß (sleep)
33 .\"O .SH SYNOPSIS
34 .SH ½ñ¼°
35 .B #include <time.h>
36 .nf
37 .sp
38 .BI "int clock_nanosleep(clockid_t " clock_id ", int " flags ,
39 .BI "                    const struct timespec *" request ,
40 .BI "                    struct timespec *" remain );
41 .fi
42 .sp
43 .\"O Link with \fI\-lrt\fP.
44 \fI\-lrt\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
45 .sp
46 .in -4n
47 .\"O Feature Test Macro Requirements for glibc (see
48 .\"O .BR feature_test_macros (7)):
49 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
50 .RB ( feature_test_macros (7)
51 »²¾È):
52 .in
53 .sp
54 .BR clock_nanosleep ():
55 _XOPEN_SOURCE\ >=\ 600
56 .\"O .SH DESCRIPTION
57 .SH ÀâÌÀ
58 .\"O Like
59 .\"O .BR nanosleep (2),
60 .\"O .BR clock_nanosleep ()
61 .\"O allows the caller to sleep for an interval specified
62 .\"O with nanosecond precision.
63 .\"O It differs in allowing the caller to select the clock against
64 .\"O which the sleep interval is to be measured,
65 .\"O and in allowing the sleep interval to be specified as
66 .\"O either an absolute or a relative value.
67 .BR clock_nanosleep ()
68 ¤ò»È¤¦¤È¡¢
69 .BR nanosleep (2)
70 ƱÍÍ¡¢¥Ê¥ÎÉäÎÀºÅ٤ǻØÄꤵ¤ì¤¿´ü´Ö¤À¤±¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¼Â¹Ô¤ò
71 Ää»ß¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
72 .BR nanosleep (2)
73 ¤È°ã¤¦¤Î¤Ï¡¢¸Æ¤Ó½Ð¤·Â¦¤¬Ää»ß´ü´Ö¤ò¤É¤Î¥¯¥í¥Ã¥¯¤ËÂФ·¤Æ·×¬¤¹¤ë¤Î¤«¤òÁªÂò
74 ¤Ç¤­¤ëÅÀ¤È¡¢Ää»ß´ü´Ö¤òÀäÂÐÃͤǤâÁêÂÐÃͤǤâ»ØÄê¤Ç¤­¤ëÅÀ¤Ç¤¢¤ë¡£
75
76 .\"O The time values passed to and returned by this call are specified using
77 .\"O .I timespec
78 .\"O structures, defined as follows:
79 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤ËÅϤ·¤¿¤ê¡¢¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬ÊÖ¤·¤¿¤ê¤¹¤ë»þ´Ö¤ÎÃͤÏ
80 .I timespec
81 ¹½Â¤ÂΤò»È¤Ã¤Æ»ØÄꤵ¤ì¤ë¡£¤³¤Î¹½Â¤ÂΤÎÄêµÁ¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡£
82 .sp
83 .in +4n
84 .nf
85 struct timespec {
86     time_t tv_sec;        /* seconds */
87     long   tv_nsec;       /* nanoseconds [0 .. 999999999] */
88 };
89 .fi
90 .in
91
92 .\"O The
93 .\"O .I clock_id
94 .\"O argument specifies the clock against which the sleep interval
95 .\"O is to be measured.
96 .\"O This argument can have one of the following values:
97 .I clock_id
98 °ú¤­¿ô¤Ç¡¢Ää»ß´ü´Ö¤ò¤É¤Î¥¯¥í¥Ã¥¯¤ËÂФ·¤Æ·×¬¤¹¤ë¤«¤ò»ØÄꤹ¤ë¡£
99 ¤³¤Î°ú¤­¿ô¤Ë¤Ï°Ê²¼¤ÎÃͤΤ¤¤º¤ì¤«°ì¤Ä¤ò»ØÄê¤Ç¤­¤ë¡£
100 .TP 17
101 .BR CLOCK_REALTIME
102 .\"O A settable system-wide real-time clock.
103 ¥·¥¹¥Æ¥àÁ´ÂΤǻȤï¤ì¤ë¼Â»þ´Ö¥¯¥í¥Ã¥¯¡£
104 ¤³¤Î¥¯¥í¥Ã¥¯¤ÏÊѹ¹²Äǽ¤Ç¤¢¤ë¡£
105 .TP
106 .BR CLOCK_MONOTONIC
107 .\"O A nonsettable, monotonically increasing clock that measures time
108 .\"O since some unspecified point in the past that does not change after
109 .\"O system startup.
110 .\"O .\" On Linux this clock measures time since boot.
111 ²áµî¤Î¤¢¤ë»þÅÀ¤«¤é¤Î»þ´Ö¤ò·×¬¤¹¤ë¡¢Ã±Ä´Áý²Ã¤Î¥¯¥í¥Ã¥¯¡£
112 µ¯ÅÀ¤È¤Ê¤ë»þÅÀ¤Ï¥·¥¹¥Æ¥àµ¯Æ°¸å¤Ë¤ÏÊѹ¹¤µ¤ì¤Ê¤¤¡£
113 ¤³¤Î¥¯¥í¥Ã¥¯¤ÏÊѹ¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£
114 .\" Linux ¤Ç¤Ï¡¢¤³¤Î¥¯¥í¥Ã¥¯¤Ïµ¯Æ°¤«¤é¤Î»þ´Ö¤ò·×¬¤¹¤ë¡£
115 .TP
116 .BR CLOCK_PROCESS_CPUTIME_ID
117 .\"O A settable per-process clock that measures CPU time consumed
118 .\"O by all threads in the process.
119 ¤½¤Î¥×¥í¥»¥¹¤ÎÁ´¥¹¥ì¥Ã¥É¤Ç¾ÃÈñ¤µ¤ì¤ë CPU »þ´Ö¤ò·×¬¤¹¤ë¥×¥í¥»¥¹Ã±°Ì¤Î
120 ¥¯¥í¥Ã¥¯¡£¤³¤Î¥¯¥í¥Ã¥¯¤ÏÀßÄê²Äǽ¤Ç¤¢¤ë¡£
121 .\" There is some trickery between glibc and the kernel
122 .\" to deal with the CLOCK_PROCESS_CPUTIME_ID case.
123 .PP
124 .\"O See
125 .\"O .BR clock_getres (2)
126 .\"O for further details on these clocks.
127 ¤³¤ì¤é¤Î¥¯¥í¥Ã¥¯¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
128 .BR clock_getres (2)
129 ¤ò»²¾È¡£
130
131 .\"O If
132 .\"O .I flags
133 .\"O is 0, then the value specified in
134 .\"O .I request
135 .\"O is interpreted as an interval relative to the current
136 .\"O value of the clock specified by
137 .\"O .IR clock_id .
138 .I flags
139 ¤¬ 0 ¤Î¾ì¹ç¡¢
140 .I request
141 ¤Ë»ØÄꤵ¤ì¤¿ÃͤÏ
142 .I clock_id
143 ¤Ç»ØÄꤵ¤ì¤¿¥¯¥í¥Ã¥¯¤Î¸½ºß¤ÎÃͤ«¤é¤ÎÁêÂÐŪ¤Ê´ü´Ö¤È²ò¼á¤µ¤ì¤ë¡£
144
145 .\"O If
146 .\"O .I flags
147 .\"O is
148 .\"O .BR TIMER_ABSTIME ,
149 .\"O then
150 .\"O .I request
151 .\"O is interpreted as an absolute time as measured by the clock,
152 .\"O .IR clock_id .
153 .\"O If
154 .\"O .I request
155 .\"O is less than or equal to the current value of the clock,
156 .\"O then
157 .\"O .BR clock_nanosleep ()
158 .\"O returns immediately without suspending the calling thread.
159 .I flags
160 ¤¬
161 .B TIMER_ABSTIME
162 ¤Î¾ì¹ç¡¢
163 .I request
164 ¤Ï»ØÄꤵ¤ì¤¿¥¯¥í¥Ã¥¯¤Ç·×¬¤µ¤ì¤ëÀäÂлþ¹ï¤È²ò¼á¤µ¤ì¤ë¡£
165 .I request
166 ¤¬»ØÄꤵ¤ì¤¿¥¯¥í¥Ã¥¯¤Î¸½ºß¤ÎÃͰʲ¼¤Î¾ì¹ç¡¢
167 .BR clock_nanosleep ()
168 ¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤ÎÄä»ß¤ò¹Ô¤ï¤º¡¢¤¹¤°¤ËÊ֤롣
169
170 .\"O .BR clock_nanosleep ()
171 .\"O suspends the execution of the calling thread
172 .\"O until either at least the time specified by
173 .\"O .IR request
174 .\"O has elapsed,
175 .\"O or a signal is delivered that causes a signal handler to be called or
176 .\"O that terminates the process.
177 .BR clock_nanosleep ()
178 ¤Ï¡¢¾¯¤Ê¤¯¤È¤â
179 .I request
180 ¤Ç»ØÄꤵ¤ì¤¿»þ´Ö¤¬·Ð²á¤¹¤ë¤Þ¤Ç¡¢¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¼Â¹Ô¤òÄä»ß¤¹¤ë¡£
181 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤¬¸Æ¤Ó½Ð¤µ¤ì¤¿¤ê¡¢¤½¤Î¥×¥í¥»¥¹¤ò½ªÎ»¤µ¤»¤ë¤è¤¦¤Ê
182 ¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤¿¤ê¤·¤¿¾ì¹ç¤Ë¤â¡¢¥¹¥ì¥Ã¥É¤Î¼Â¹ÔÄä»ß¤Ï½ªÎ»¤¹¤ë¡£
183
184 .\"O If the call is interrupted by a signal handler,
185 .\"O .BR clock_nanosleep ()
186 .\"O returns \-1, and sets
187 .\"O .I errno
188 .\"O to
189 .\"O .BR EINTR .
190 .\"O In addition, if
191 .\"O .I remain
192 .\"O is not NULL, and
193 .\"O .I flags
194 .\"O was not
195 .\"O .BR TIMER_ABSTIME ,
196 .\"O it returns the remaining unslept time in
197 .\"O .IR remain .
198 .\"O This value can then be used to call
199 .\"O .BR clock_nanosleep ()
200 .\"O again and complete a (relative) sleep.
201 ¸Æ¤Ó½Ð¤·¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤Ã¤Æ³ä¤ê¹þ¤Þ¤ì¤¿¾ì¹ç¡¢
202 .BR clock_nanosleep ()
203 ¤Ï \-1 ¤òÊÖ¤·¡¢
204 .I errno
205 ¤Ë
206 .B EINTR
207 ¤òÀßÄꤹ¤ë¡£¤½¤ì¤Ë²Ã¤¨¤Æ¡¢
208 .I remain
209 ¤¬ NULL ¤Ç¤Ê¤¯¡¢¤«¤Ä
210 .I flags
211 ¤¬
212 .B TIMER_ABSTIME
213 ¤Ç¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢
214 .I remain
215 ¤Ë»Ä¤ê¤ÎÄä»ß»þ´Ö¤¬ÊÖ¤µ¤ì¤ë¡£
216 ¤³¤ÎÃͤò»È¤Ã¤Æ
217 .BR clock_nanosleep ()
218 ¤òºÆÅٸƤӽФ¹¤³¤È¤Ç¡¢(ÁêÂÐŪ¤Ê´ü´Ö¤Î) Ää»ß¤ò´°Î»¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
219 .\"O .SH "RETURN VALUE"
220 .SH ÊÖ¤êÃÍ
221 .\"O On successfully sleeping for the requested interval,
222 .\"O .BR clock_nanosleep ()
223 .\"O returns 0.
224 .\"O If the call is interrupted by a signal handler or encounters an error,
225 .\"O then it returns a positive error number.
226 Í׵ᤵ¤ì¤¿´ü´Ö¤ÎÄä»ß¤ËÀ®¸ù¤¹¤ë¤È¡¢
227 .BR clock_nanosleep ()
228 ¤Ï 0 ¤òÊÖ¤¹¡£
229 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ç³ä¤ê¹þ¤Þ¤ì¤¿¤ê¡¢¥¨¥é¡¼¤¬È¯À¸¤·¤¿¤ê¤·¤¿¾ì¹ç¡¢
230 Àµ¤Î¥¨¥é¡¼ÈÖ¹æ¤òÊÖ¤¹¡£
231 .\"O .SH ERRORS
232 .SH ¥¨¥é¡¼
233 .TP
234 .B EFAULT
235 .\"O .I request
236 .\"O or
237 .\"O .I remain
238 .\"O specified an invalid address.
239 .I request
240 ¤ä
241 .I remain
242 ¤Ë̵¸ú¤Ê¥¢¥É¥ì¥¹¤¬»ØÄꤵ¤ì¤¿¡£
243 .TP
244 .B EINTR
245 .\"O The sleep was interrupted by a signal handler.
246 Ää»ß¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤ê³ä¤ê¹þ¤Þ¤ì¤¿¡£
247 .TP
248 .B EINVAL
249 .\"O The value in the
250 .\"O .I tv_nsec
251 .\"O field was not in the range 0 to 999999999 or
252 .\"O .I tv_sec
253 .\"O was negative.
254 .I tv_nsec
255 ¥Õ¥£¡¼¥ë¥É¤ÎÃͤ¬ 0 ¤«¤é 999999999 ¤ÎÈϰϤǤʤ¤¤«¡¢
256 .I tv_sec
257 ¤ÎÃͤ¬Éé¤Ç¤¢¤Ã¤¿¡£
258 .TP
259 .B EINVAL
260 .\"O .I clock_id
261 .\"O was invalid.
262 .\"O .RB ( CLOCK_THREAD_CPUTIME_ID
263 .\"O is not a permitted value for
264 .\"O .IR clock_id .)
265 .I clock_id
266 ¤¬Ìµ¸ú¤Ç¤¢¤Ã¤¿
267 .RB ( CLOCK_THREAD_CPUTIME_ID
268 ¤¬
269 .I clock_id
270 ¤È¤·¤ÆÍ­¸ú¤ÊÃͤǤϤʤ¤)¡£
271 .\"O .SH VERSIONS
272 .SH ¥Ð¡¼¥¸¥ç¥ó
273 .\"O The
274 .\"O .BR clock_nanosleep ()
275 .\"O system call first appeared in Linux 2.6.
276 .\"O Support is available in glibc since version 2.1.
277 .BR clock_nanosleep ()
278 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux 2.6 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
279 glibc ¤Ç¤Ï¥Ð¡¼¥¸¥ç¥ó 2.1 °Ê¹ß¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¡£
280 .\"O .SH "CONFORMING TO"
281 .SH ½àµò
282 POSIX.1-2001.
283 .\"O .SH NOTES
284 .SH Ãí°Õ
285 .\"O If the interval specified in
286 .\"O .I request
287 .\"O is not an exact multiple of the granularity underlying clock (see
288 .\"O .BR time (7)),
289 .\"O then the interval will be rounded up to the next multiple.
290 .\"O Furthermore, after the sleep completes, there may still be a delay before
291 .\"O the CPU becomes free to once again execute the calling thread.
292 .I request
293 ¤Ç»ØÄꤵ¤ì¤¿Ää»ß´ü´Ö¤¬¡¢»þ´Ö¤Î·×¬¤Ë»ÈÍѤµ¤ì¤ë¥¯¥í¥Ã¥¯
294 .RB ( time (7)
295 »²¾È) ¤ÎÀºÅÙ¤ÎÇÜ¿ô¤Á¤ç¤¦¤É¤Ç¤Ê¤¤¾ì¹ç¡¢Ää»ß´ü´Ö¤Ï°ìÈֶᤤ¼¡¤ÎÇÜ¿ô¤Ë
296 ÀÚ¤ê¾å¤²¤é¤ì¤ë¡£¤µ¤é¤Ë¡¢Ää»ß¤¬´°Î»¤·¤¿¸å¤Ë¡¢CPU ¤¬¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤ò
297 ¤â¤¦°ìÅټ¹ԤǤ­¤ë¤è¤¦¤Ë¤Ê¤ë¤Þ¤Ç¤Ë¤Ï¡¢Ãٱ䤬Æþ¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
298
299 .\"O Using an absolute timer is useful for preventing
300 .\"O timer drift problems of the type described in
301 .\"O .BR nanosleep (2).
302 .\"O (Such problems are exacerbated in programs that try to restart
303 .\"O a relative sleep that is repeatedly interrupted by signals.)
304 ÀäÂÐÃÍ»ØÄê¤Î¥¿¥¤¥Þ¤ò»È¤¦¤Î¤Ï¡¢
305 .BR nanosleep (2)
306 ¤Ë½ñ¤«¤ì¤Æ¤¤¤ëÎà¤Î¥¿¥¤¥Þ¤Î¤º¤ì¤ÎÌäÂê¤òËɻߤ¹¤ë¤Î¤ËÌòΩ¤Ä
307 (¤³¤Î¼ï¤ÎÌäÂê¤Ï¡¢¥·¥°¥Ê¥ë¤Ë³ä¤ê¹þ¤Þ¤ì¤¿ºÝ¤ËÁêÂлØÄê¤ÎÄä»ß¤ò
308 ·«¤êÊÖ¤·ºÆ³«¤·¤è¤¦¤È¤¹¤ë¥×¥í¥°¥é¥à¤Ç¤Ï¡¢¤«¤¨¤Ã¤Æ°­²½¤¹¤ë)¡£
309 .\"O To perform a relative sleep that avoids these problems, call
310 .\"O .BR clock_gettime (2)
311 .\"O for the desired clock,
312 .\"O add the desired interval to the returned time value,
313 .\"O and then call
314 .\"O .BR clock_nanosleep ()
315 .\"O with the
316 .\"O .B TIMER_ABSTIME
317 .\"O flag.
318 ¤³¤ì¤é¤ÎÌäÂê¤ò²óÈò¤·¤ÆÁêÂлØÄê¤ÎÄä»ß¤ò¼Â¹Ô¤¹¤ë¤Ë¤Ï¡¢
319 ´õ˾¤¹¤ë¥¯¥í¥Ã¥¯¤Ç
320 .BR clock_gettime (2)
321 ¤ò¸Æ¤Ó½Ð¤·¡¢¤½¤ÎÊÖ¤êÃͤλþ¹ïÃͤ˴õ˾¤¹¤ë´ü´Ö¤ò²Ã»»¤·¤Æ¤«¤é¡¢
322 .B TIMER_ABSTIME
323 ¥Õ¥é¥°¤ò»ØÄꤷ¤Æ
324 .BR clock_nanosleep ()
325 ¤ò¸Æ¤Ó½Ð¤¹¡£
326
327 .\"O .BR clock_nanosleep ()
328 .\"O is never restarted after being interrupted by a signal handler,
329 .\"O regardless of the use of the
330 .\"O .BR sigaction (2)
331 .\"O .B SA_SIGACTION
332 .\"O flag.
333 .BR sigaction (2)
334 ¤Ç
335 .BR SA_RESTART
336 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤«¤Ë´Ø¤ï¤é¤º¡¢
337 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤ê³ä¤ê¹þ¤Þ¤ì¤¿¸å¤Ë
338 .BR clock_nanosleep ()
339 ¤¬ºÆ³«¤µ¤ì¤ë¤³¤È¤Ï·è¤·¤Æ¤Ê¤¤¡£
340
341 .\"O The
342 .\"O .I remain
343 .\"O argument is unused, and unnecessary, when
344 .\"O .I flags
345 .\"O is
346 .\"O .BR TIMER_ABSTIME .
347 .\"O (An absolute sleep can be restarted using the same
348 .\"O .I request
349 .\"O argument.)
350 .I flags
351 ¤¬
352 .B TIMER_ABSTIME
353 ¤Î¾ì¹ç¡¢
354 .I remain
355 °ú¤­¿ô¤Ï»ÈÍѤµ¤ì¤º¡¢ÉÔÍפǤ¢¤ë
356 (ÀäÂÐÃͤǤÎÄä»ß¤Ç¤Ï¡¢Æ±¤¸
357 .I request
358 °ú¤­¿ô¤ò»È¤Ã¤ÆºÆÅٸƤӽФ¹¤³¤È¤¬¤Ç¤­¤ë)¡£
359
360 .\"O POSIX.1 specifies that
361 .\"O .BR clock_nanosleep ()
362 .\"O has no effect on signals dispositions or the signal mask.
363 POSIX.1 ¤Îµ¬Äê¤Ç¤Ï¡¢
364 .BR clock_nanosleep ()
365 ¤Ï¥·¥°¥Ê¥ë¤Î½èÍýÊýË¡¤ä¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Ë±Æ¶Á¤òÍ¿¤¨¤Ê¤¤¡¢¤È¤µ¤ì¤Æ¤¤¤ë¡£
366
367 .\"O POSIX.1 specifies that after changing the value of the
368 .\"O .B CLOCK_REALTIME
369 .\"O clock via
370 .\"O .BR clock_settime (2),
371 .\"O the new clock value shall be used to determine the time
372 .\"O at which a thread blocked on an absolute
373 .\"O .BR clock_nanosleep ()
374 .\"O will wake up;
375 .\"O if the new clock value falls past the end of the sleep interval, then the
376 .\"O .BR clock_nanosleep ()
377 .\"O call will return immediately.
378 POSIX.1 ¤Îµ¬Äê¤Ç¤Ï¡¢
379 .BR clock_settime (2)
380 ¤Ç
381 .B CLOCK_REALTIME
382 ¥¯¥í¥Ã¥¯¤ÎÃͤòÊѹ¹¤·¤¿¸å¤Ï¡¢ÀäÂÐÃÍ»ØÄê¤Î
383 .BR clock_nanosleep ()
384 ¤ÇÄä»ß¤·¤Æ¤¤¤ë¥¹¥ì¥Ã¥É¤òµ¯Æ°¤µ¤»¤ë»þ¹ï¤ÎȽÄê¤Ï¡¢
385 ¿·¤·¤¤¥¯¥í¥Ã¥¯Ãͤò»È¤Ã¤Æ¹Ô¤ï¤ì¤ë¡¢¤È¤µ¤ì¤Æ¤¤¤ë¡£
386 ¿·¤·¤¤¥¯¥í¥Ã¥¯Ãͤˤª¤¤¤ÆÄä»ß´ü´Ö¤Î½ªÎ»»þ¹ï¤¬²áµî¤Ë¤Ê¤Ã¤Æ¤·¤Þ¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢
387 .BR clock_nanosleep ()
388 ¤Ï¤¹¤°¤ËÊ֤뤳¤È¤Ë¤Ê¤ë¡£
389
390 .\"O POSIX.1 specifies that
391 .\"O changing the value of the
392 .\"O .B CLOCK_REALTIME
393 .\"O clock via
394 .\"O .BR clock_settime (2)
395 .\"O shall have no effect on a thread that is blocked on a relative
396 .\"O .BR clock_nanosleep ().
397 POSIX.1 ¤Îµ¬Äê¤Ç¤Ï¡¢
398 .BR clock_settime (2)
399 ¤Ç
400 .B CLOCK_REALTIME
401 ¥¯¥í¥Ã¥¯¤ÎÃͤòÊѹ¹¤·¤Æ¤â¡¢ÁêÂÐÃÍ»ØÄê¤Î
402 .BR clock_nanosleep ()
403 ¤ÇÄä»ß¤·¤Æ¤¤¤ë¥¹¥ì¥Ã¥É¤Ë¤Ï±Æ¶Á¤òÍ¿¤¨¤Ê¤¤¡¢¤È¤µ¤ì¤Æ¤¤¤ë¡£
404 .\"O .SH "SEE ALSO"
405 .SH ´ØÏ¢¹àÌÜ
406 .BR clock_getres (2),
407 .BR nanosleep (2),
408 .BR timer_create (2),
409 .BR sleep (3),
410 .BR usleep (3),
411 .BR time (7)