Last active
May 22, 2016 06:28
-
-
Save hbhargava7/cbdc85138be382ce737824c976846e71 to your computer and use it in GitHub Desktop.
Code to compute and log the execution time in seconds for some process in Objective C.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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