Tuesday, 27 January 2015

Code execution time in ios

NSDate *methodStart = [NSDate date];

////---  code to calculate execution time

NSDate *methodFinish = [NSDate date];
NSTimeInterval executionTime = [methodFinish timeIntervalSinceDate:methodStart];
NSLog(@"executionTime(seconds) = %f", executionTime);

No comments:

Post a Comment