thread_sleep
De cppreference.com
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
Definido en el archivo de encabezado <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.
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.
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.
You can help to correct and verify the translation. Click here for instructions.
[editar] Ver también
(C11) |
yields the current time slice (función) |