Re: high accuracy timing options?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Aaron Turner writes:
First since everyone keeps asking: I'm trying to introduce artificial delays in my code in order to accurately send packets at a user specified rate- generally in the range of a few packets/sec all the way to 160,000+p/s which is about where you start running into the hardware limits. Code is currently pretty portable: Linux, *BSD, Solaris, OS X, Windows/Cygwin and even MIPS based hardware running on the international space station or so I've been told.
Considering the basic overhead of processing the packets, sending them, etc you start seeing delay times well under 10ms which is where traditional sleep methods start becoming unreliable.
One thing to keep in mind about MacOSX is that the sleep is *really* accurate compared to Linux, BSD and Solaris. See http://www.dragonflybsd.org/docs/nanosleep/index.shtml Drew _______________________________________________ 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
participants (1)
-
Andrew Gallatin