I need to measure elapsed time, in order to know when a certain period of time has been exceeded.
I used to use Ticks()
and Microseconds()
for this, but both functions are now deprecated.
CFAbsoluteTimeGetCurrent
is not the correct way to use because it may run backwards, as explained in the docs:
Repeated calls to this function do not guarantee monotonically increasing results. The system time may decrease due to synchronization with external time references or due to an explicit user change of the clock.
What else is there that's not deprecated and fairly future-proof?