Re: Nanosleep granularity in MacOS?
Re: Nanosleep granularity in MacOS?
- Subject: Re: Nanosleep granularity in MacOS?
- From: Rustam Muginov <email@hidden>
- Date: Mon, 18 Jan 2010 08:46:34 +0300
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&wm=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