Skip to content

Instantly share code, notes, and snippets.

Last active May 22, 2016
What would you like to do?
Code to compute and log the execution time in seconds for some process in Objective C.
/* Created by Hersh Bhargava of H2 Micro ( */
NSDate *processStart = [NSDate date];
//Process Here!
NSDate *methodFinish = [NSDate date];
NSTimeInterval executionTime = [methodFinish timeIntervalSinceDate:methodStart];
NSLog(@"Process Execution Time (s): %f", executionTime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment