I suggest using CFAbsoluteTimeGetCurrent() …
is based on
and thus will change with the system clock.
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"