site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Aaron Turner writes:
Interesting how gettimeofday() fails to increment around 90% of the time. I guess technically incrementing 1/10 times while requiring
FWIW, I hacked your program to keep some stats, and on a core2 iMac I have access to, I see an average increment of just over 1us with an occasional outlier of a few ms (probably when something stole the CPU from the app). Given that gtod has a 1us granualarity, and the program is not realtime, that is not too bad.
~13 times to measure a usec is good enough, but it's not giving me a warm & fuzzy feeling. Running a tight gettimeofday() loop in my application seems to have good results down to 8usec between events
I have no idea what you're trying to do, so its hard to provide any solution that would make you warm and fuzzy. I was mearly suggesting that the accuracy of gettimeofday() on MacOSX is likely good enough for most timing you might want to do.. 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