Espacios de nombres
Variantes
Acciones

thread_sleep

De cppreference.com
< c‎ | thread

 
 
Tema Biblioteca de ayuda
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.
Exclusión mutua
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.
Llame a la vez
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.
Las variables de condición
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.
Almacenamiento local de subprocesos
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 );
(desde C11)
Bloquea la ejecución del subproceso actual durante al menos' hasta el punto TIME_UTC basado en el tiempo señalado por time_point se ha llegado .
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.
El sueño puede reanudar antes si una señal que no se tiene en cuenta que se recibe. En tal caso, si no es remaining NULL, la duración de tiempo restante se almacena en el objeto apuntado por 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.

[editar] Parámetros

time_point -
puntero hasta el punto de la hora de dormir hasta
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 -
puntero al objeto de poner el tiempo restante de interrupción. Pueden estar NULL, en cuyo caso, se ignora
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.

[editar] Valor de retorno

0 sobre el sueño exitoso, -1 si una alarma ocurrió otro valor negativo si ocurre un error .
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.

[editar] Ver también

yields the current time slice
(función) [edit]