search for: programmersought

Displaying 1 result from an estimated 1 matches for "programmersought".

2020 Mar 27
2
[Bug 14328] New: usleep() is obsolete, use nanosleep()
...the sleep interval; POSIX.1 explicitly specifies that it does not interact with signals; and it makes the task of resuming a sleep that has been interrupted by a signal handler easier. also mind this one, as usleep return value is NOT being checked at the moment : http://www.programmersought.com/article/5824721961/ 2, pay attention Be sure to pay attention to the return value when using these functions. Sometimes the sleep function is interrupted by the system, and the result is not as expected. while (nanosleep(&ts, &ts) == -1 && errno == EINTR) {} so - usleep is...