thread_sleep
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <threads.h>
|
||
int thrd_sleep( const struct timespec* time_point, struct timespec* remaining ); |
(dal C11) | |
Blocca l'esecuzione del thread corrente di almeno fino al punto temporale basato TIME_UTC puntato da
time_point
è stato raggiunto.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.
Il sonno può riprendere prima se un segnale che non viene ricevuto viene ignorato. In tal caso, se non è
remaining
NULL, la durata di tempo rimanente viene memorizzato nell'oggetto puntato da 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.
You can help to correct and verify the translation. Click here for instructions.
[modifica] Parametri
time_point | - | puntatore al punto di tempo a dormire fino
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 | - | puntatore all'oggetto di mettere il tempo residuo sul interruzione. Può essere NULL, nel qual caso viene ignorato
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. |
[modifica] Valore di ritorno
0 sul sonno di successo, -1 se si è verificato un interrupt, altro valore negativo in caso di errore.
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.
[modifica] Vedi anche
(C11) |
yields the current time slice (funzione) |