Re: Nanosleep granularity in MacOS?
Re: Nanosleep granularity in MacOS?
- Subject: Re: Nanosleep granularity in MacOS?
- From: Paul M <email@hidden>
- Date: Tue, 19 Jan 2010 00:04:00 +1300
I seem to recall a _very_ in-depth discussion of the various unix time
functions
and how they relate to OSX, by Terry Lambert. It would have been on
this list or
the Unix Porting list.
If you can find that in the list archives, I'm sure it would answer all
your
questions about which to use where, when, and how they function.
paulm
On 18/01/2010, at 6:46 PM, Rustam Muginov wrote:
Hello, Jay.
I think that mach_absolute_time function does have the best resolution
available. I was also discussed in performance-optimization maillist
and appeared that mach_absolute_time is the lowest-level recommended
function.
You might want to check here:
http://developer.apple.com/mac/library/qa/qa2004/qa1398.html
and here:
http://search.lists.apple.com/?
q=mach_absolute_time&cmd=Search!&form=extended&m=all&ps=10&fmt=long&w
m=wrd&wf=2221&sp=1&ul=PerfOptimization-dev
P.S. Your name sounds familiar, any relation with Jay 'Saurik' Freeman?
On Jan 18, 2010, at 3:50 AM, Jay Reynolds Freeman wrote:
If there is a more appropriate mailing list for this question,
please suggest it.
Perusing the web suggests that there is a "granularity" -- a
minimum sleep time -- at which the behavior of the "nanosleep"
function changes: For times shorter than the threshold, it
simply loops, but for longer times it may in fact actually
sleep, and give other processes a chance to run,
Does anyone know what this time is (or what other, possibly
related times are), for MacOS?
The answer is likely processor and clock-speed dependent, so
is there a way to obtain this information at run-time on
particular Mac platforms?
Thanks.
-- Jay Reynolds Freeman
---------------------
email@hidden
http://web.mac.com/jay_reynolds_freeman (personal web site)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Sincerely, Rustam Muginov
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden