int thrd_sleep( const struct timespec* duration,
struct timespec* remaining );
Blocks the execution of the current thread for at least until the TIME_UTC based duration pointed to by duration
has elapsed.
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
.
â0â on successful sleep, -1 if a signal occurred, other negative value if an error occurred.
[edit] Notesduration
and remaining
may point at the same object, which simplifies re-running the function after a signal.
The actual sleep time may be longer than requested because it is rounded up to the timer granularity and because of scheduling and context switching overhead.
The POSIX equivalent of this function is nanosleep
.
Output:
Time: Mon Feb 2 16:18:41 2015 Time: Mon Feb 2 16:18:42 2015[edit] References
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4