site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=3KmzDoT6vwy2YUKWcKl1Dw4gnH4LzfQdEQ0IXn32uqU=; b=fejxA9ZrYRRijXYIbKk2NllG0FDdpeyAuzEHqd+474imI7Hd+DkhH2+EepbtB9aBPhnCVvFKj/OlNd9DlM9tdxI+T4G5FNFeiwk9hGnQrRrMiHZx9jHBZy307y8zAo9Q+VXXf0RXMEr8SnTPbEOfpH9wYukKejsTEgLwQd1ze0s= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ckGTwBsW/DhYjngUy1p/LitmhGhDyWBYynsrRic5nCItGArzu9bq/1T1NyV2RREYkbMfXZUaqRhSzrsEwau1YgJOrEG5HvQGAUo5URdaA/lDovxeNh9+pzvYRnzPf4JGIej13/q4Uma4FN133e9qgx7tssXsV2R5G3Nadu21Xr8= On Thu, Mar 27, 2008 at 2:31 PM, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
On 27 Mar 2008, at 22:25, Andrew Gallatin wrote:
One thing to keep in mind about MacOSX is that the sleep is *really* accurate compared to Linux, BSD and Solaris.
And also that this is mainly because for very small delays, Darwin lets the "waiting" thread simply burn cpu cycles until the delay is over (at least when I looked into this a couple of years ago). The result is that very small delays are (were) quite inefficient from a multi-processing perspective on Darwin (with the mentioned upshot that they're pretty accurate).
My current code uses nanosleep(). Works great up to 125k pps (less then 1% error). @ 130k, it goes way off (~10% error). -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing & replay tools for Unix They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com