nanosleep() causes the current thread to be suspended until either:
1) the time interval in rqtp passes
2) a signal whose action is to terminate the process or invoke a signal
catching function is delivered to the current thread
Unless nanosleep() is interrupted (as in 2) above), nanosleep() must always
suspend the process for _at least_ the time interval in rqtp - as
measured by CLOCK_REALTIME.
[Occasionally, the time could be > rqtp interval because of
scheduling/rounding.]
nanosleep() does not effect the action/blockage of a signal
nanosleep() returns 0 if it returns because the time interval in rqtp
has elapsed
nanosleep() returns -1 on failure or if interrupted
nanosleep() sets errno to EINVAL if rqtp contained a nanosecond value
below 0 or above (or equal to) 1,000 million
nanosleep() sets errno to EINTR if it is interrupted by a signal.
Also, if rmtp != NULL, rmtp will be set to the time remaining (i.e.,
requested time - time slept). Otherwise, time remaining is not
returned.