Skip to content

Instantly share code, notes, and snippets.

@hbhargava7

hbhargava7/ProcessTiming.m

Last active May 22, 2016
Embed
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 (www.h2micro.com) */
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
You can’t perform that action at this time.