| The pthread_delay_np function converts your "delta" (relative time) struct
timespec into an absolute time. The struct timespec format expresses the date
as the number of seconds (and nanoseconds) since the UNIX Epoch, Jan 1
00:00:00 UTC 1970. The count of seconds (a time_t) is expressed as a signed
32 bit integer, which gives a maximum timeout of about Feb 4 03:14:07 UTC
2038. (That is, ignoring the nanoseconds field, which, if you want to get
technical about it, could be taken to increase the maximum expiration to one
nanosecond short of 03:14:08.)
The sleep(3) function argument is an unsigned int, but, currently, sleep
actually calls a kernel function that takes a relative time expressed as a
struct timeval -- which again uses a time_t (signed int) for the seconds.
However, sleep() explicitly limits the seconds to 100000000
(TOD_MAX_SECONDS). That gives a maximum timeout of 3 years, 62 days, 9 hours,
46 minutes, 40 seconds from the current time.
/dave
|