Re: high accuracy timing options?
Re: high accuracy timing options?
- Subject: Re: high accuracy timing options?
- From: Andrew Gallatin <email@hidden>
- Date: Thu, 27 Mar 2008 16:15:02 -0400 (EDT)
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden