名前空間
変種
操作

thread_sleep

提供: cppreference.com
< c‎ | thread

 
 
スレッドのサポートライブラリ
スレッド
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
相互排除
Original:
Mutual exclusion
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
一度呼び出します
Original:
Call once
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
条件変数
Original:
Condition variables
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
スレッドローカルストレージ
Original:
Thread-local storage
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Defined in header <threads.h>
int thrd_sleep( const struct timespec* time_point,
                struct timespec* remaining );
(C11以来)
ブロックの現在のスレッドの実行少なくともTIME_UTCベースの時点はtime_pointによって指されるまでに達しています.
Original:
Blocks the execution of the current thread for at least until the TIME_UTC based time point pointed to by time_point has been reached.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
無視されていない信号を受信した場合は、以前の睡眠を再開できます。 remainingNULLされていない場合このような場合には、残りの持続時間はremainingが指すオブジェクトに格納されている.
Original:
The sleep may resume earlier if a signal that is not ignored is received. In such case, if remaining is not NULL, the remaining time duration is stored into the object pointed to by remaining.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] パラメータ

time_point -
までスリープ状態にした時点へのポインタ
Original:
pointer to the time point to sleep until
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remaining -
中断に残り時間を置くためのオブジェクトへのポインタ。これは無視される場合にNULL、かもしれません
Original:
pointer to the object to put the remaining time on interruption. May be NULL, in which case it is ignored
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

0成功した睡眠への割り込みが発生した場合-1、他の負の値はエラーが発生した場合..
Original:
0 on successful sleep, -1 if an interrupt occurred, other negative value if an error occurred.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] も参照してください

yields the current time slice
(機能) [edit]