I'm trying to replace some deprecated functions in Xcode with newer ones although I can't quite seem to figure out how to make it work properly:
AbsoluteTime startTime = UpTime();
float frameTime = UnsignedWideToUInt64(AbsoluteDeltaToNanoseconds(UpTime(),startTime))/1E9;
I get two warnings with this statement:
'UpTime' is deprecated: first deprecated in macOS 10.8
'AbsoluteDeltaToNanoseconds' is deprecated: first deprecated in macOS 10.8
I looked at various other threads here, and tried to use:
NSTimeInterval systemUptime = [[NSProcessInfo processInfo] systemUptime] / 1E9;
It didn't seem to return the same result though:
1: 0.011983 // deprecated function
2: 0.000431 // replacement function
1: 0.007218
2: 0.000431
1: 0.007084
2: 0.000431
I presume that there's something else I need to do to get the correct value for the new function?