Namespace
Varianti

thread_sleep

Da cppreference.com.
< c‎ | thread

 
 
Discussione libreria di supporto
Threads
Original:
Threads
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mutua esclusione
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.
Chiama una volta
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.
Condizioni variabili
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.
Thread-local storage
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.
 
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.
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.

[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.

[modifica] Vedi anche

yields the current time slice
(funzione) [modifica]