thread_sleep
De 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. |
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <threads.h>
|
||
int thrd_sleep( const struct timespec* time_point, struct timespec* remaining ); |
(desde C11) | |
Bloqueia a execução da thread atual para pelo menos até o ponto de tempo
TIME_UTC baseado apontado por time_point foi atingido.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.
O sono pode retomar mais cedo, se um sinal que não é ignorada é recebido. Em tal caso, não é se
remaining NULL, a duração do tempo remanescente são armazenados no objeto apontado 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.
Parâmetros
| time_point | - | ponteiro para o ponto de tempo para dormir até
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 | - | ponteiro para o objeto para colocar o tempo restante de interrupção. Pode ser NULL, caso em que ele será ignorado
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. |
Valor de retorno
0 no sono bem sucedido, -1 se uma interrupção ocorreu, outro valor negativo se ocorrer um erro.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.
Veja também
(C11) |
yields the current time slice (função) |