To roughly measure the time necessary to do a certain action:
#include <mach/mach.h> #include <mach/mach_time.h>
uint64_t start = mach_absolute_time(); // Do something uint64_t duration = mach_absolute_time() - start; NSLog(@"Time to do something: %d", duration);
Some tips: