Re: Sleeping in nanos
Re: Sleeping in nanos
- Subject: Re: Sleeping in nanos
- From: Jan Brittenson <email@hidden>
- Date: Sat, 03 Feb 2007 00:03:42 -0800
Greg wrote:
So then why do I barely see 1% CPU utilization on linux?
But how accurate is it? When I last dealt with this a few years ago,
nanosleep
always slept at least 10ms on Linux. Some quick googling shows this
still seems
to be the case.
nanosleep with a timespec = { 0, 10000 } in a tight loop uses only about
5-7% CPU
on a MacBook Pro. So if you simulate the Linux behavior by always
rounding up
to the nearest 10ms you'll get reasonably similar behavior.
_______________________________________________
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