Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: high accuracy timing options?



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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >high accuracy timing options? (From: "Aaron Turner" <email@hidden>)
 >Re: high accuracy timing options? (From: Andrew Gallatin <email@hidden>)
 >Re: high accuracy timing options? (From: "Aaron Turner" <email@hidden>)
 >Re: high accuracy timing options? (From: "Aaron Turner" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.