Re: Sleeping in nanos
Re: Sleeping in nanos
- Subject: Re: Sleeping in nanos
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 8 Feb 2007 09:00:19 -0800
On 2/8/07, Greg <email@hidden> wrote:
Man page on nanosleep, Greg's version:
nanosleep - suspend thread execution for an interval measured in
nanoseconds
Nanosleep() causes the calling thread to sleep for a duration of
time. This function
is not recommended because on most systems, including OS X, the
nanosleep function
will not sleep for less than 1000 nanoseconds due to system
requirements, it is therefore
not recommended for time critical applications; use usleep instead.
So do you expect the man page to change for each piece of hardware
that Mac OS X lives on? The man page has to be generic to an
appropriate point so as to not state something that may not be true in
the larger environment.
The existing man states the issues to consider when using nanosleep.
Now could the man page make it even more clear just how far off from
one nanosecond it could sleep sure... but again back in 1993 (and even
today) it is obvious that it cannot get close to one nanosecond.
If you want to see a change to the man page file a documentation
defect with Apple about it...
<http://developer.apple.com/bugreporter/>
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden