RE: Filling in a struct timespec with the current date?
RE: Filling in a struct timespec with the current date?
- Subject: RE: Filling in a struct timespec with the current date?
- From: "Karan, Cem (Civ, ARL/CISD)" <email@hidden>
- Date: Wed, 29 Jul 2009 08:05:08 -0400
- Thread-topic: Filling in a struct timespec with the current date?
Terry Lambert wrote on Tuesday, July 28, 2009 2:51 PM
<<SNIP>>
> Or if he needs better resolution, mach_absolute_time(), which
> is well documented at <http://developer.apple.com>.
<<SNIP>>
OK, the best documentation I've found for this is at
http://developer.apple.com/qa/qa2004/qa1398.html
and I whipped up a quick test program to ensure I knew what I was doing with it. Now my question concerns accuracy; I know that mach_absolute_time() resolves to one nanosecond, but what is the accuracy? Is there a way to tell what the accuracy is from the mach_timebase_info struct? E.g., the greatest common denominator between numer and denom is the accuracy of the clock in nanoseconds?
This won't affect my current code, but I'd like to stick it into my own documentation so whenever I reuse this code I know what I'm getting in to.
Thanks,
Cem Karan
_______________________________________________
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