Is is any difference between using mach_absolute_time and the simple NSDate method explained by golden eagle below?
Here's an excellent explanation of using the mach approach...
How do I accurately time how long it takes to call a function on the iPhone?
and
Measure time between library call and callback
loop { NSDate *start = [NSDate date]; // a considerable amount of difficult processing here // a considerable amount of difficult processing here // a considerable amount of difficult processing here NSDate *methodFinish = [NSDate date]; NSTimeInterval executionTime = [methodFinish timeIntervalSinceDate:start]; NSLog(@"Execution Time: %f", executionTime); }
Should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With