thread_sleep
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
definiert in Header <threads.h>
|
||
int thrd_sleep( const struct timespec* time_point, struct timespec* remaining ); |
(Seit C11) | |
Blockiert die Ausführung des aktuellen Threads für mindestens bis die TIME_UTC basierte Zeitpunkt, auf den
time_point
erreicht wurde .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.
You can help to correct and verify the translation. Click here for instructions.
Der Schlaf kann früher wieder aufzunehmen, wenn ein Signal, das nicht ignoriert wird, erhalten. In einem solchen Fall, wenn
remaining
nicht NULL wird die verbleibende Zeitdauer in den Gegenstand, auf den durch remaining
gespeichert .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.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Parameter
time_point | - | Zeiger auf den Zeitpunkt, bis zu schlafen
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 | - | Zeiger auf das Objekt, um die verbleibende Zeit auf Unterbrechung setzen. NULL kann, in welchem Fall es ignoriert wird
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. |
[Bearbeiten] Rückgabewert
0 über erfolgreiche Schlaf, -1 wenn ein Interrupt aufgetreten ist, anderen negativen Wert, wenn ein Fehler aufgetreten ist .
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.
You can help to correct and verify the translation. Click here for instructions.
[Bearbeiten] Siehe auch
(C11) |
yields the current time slice (Funktion) |