CFAbsoluteTimeGetCurrent () (about 6 microseconds) or mach_absolute_time () from mach / mach_time.h (somewhat faster, but you need to call mach_timebase_info () and do some conversions). Then you can print to stdout or use NSLog; note that NSLog takes age (50 ms?), so you want to do this after taking the measurements. It seems to me that stdout is a little faster, but it does not go to syslog (i.e. the console of the Xcode Organizer / iPhone configuration console).
source
share