• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sleeping in nanos
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Sleeping in nanos
      • From: Ed Wynne <email@hidden>
References: 
 >Sleeping in nanos (From: Greg <email@hidden>)
 >Fwd: Sleeping in nanos (From: Greg <email@hidden>)
 >Re: Sleeping in nanos (From: Ed Wynne <email@hidden>)
 >Re: Sleeping in nanos (From: Greg <email@hidden>)

  • Prev by Date: Re: Sleeping in nanos
  • Next by Date: Re: Sleeping in nanos
  • Previous by thread: Re: Sleeping in nanos
  • Next by thread: Re: Sleeping in nanos
  • Index(es):
    • Date
    • Thread