ObjectHub wrote:
I suggest using CFAbsoluteTimeGetCurrent() …
CFAbsoluteTimeGetCurrent
is based on
gettimeofday
and thus will change with the system clock.
benrimmington wrote:
For real time threads, see Technical Note TN2169 …
Mach absolute time may well be the right option here, and all of the APIs you mentioned are based on Mach absolute time.
The big gotcha with these APIs is that Mach absolute time stops when the CPU sleeps. @OmniOnline, if you only need to track time while your app is in the foreground, Mach absolute time (or one of its derivatives) is your best option. Otherwise things get more complex and you should post a follow-up with more information about your goals.
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"