Last active
August 29, 2015 13:57
-
-
Save vamsiac/9834598 to your computer and use it in GitHub Desktop.
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
//Appdelegate.h | |
CFAbsoluteTime StartTime; | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
@end | |
//In your main.m start your timer | |
int main(int argc, char *argv[]) | |
{ | |
StartTime = CFAbsoluteTimeGetCurrent(); | |
@autoreleasepool { | |
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); | |
} | |
} | |
//Finally in your AppDelegate.m | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
NSLog(@"Launched in %f sec", CFAbsoluteTimeGetCurrent() - StartTime); | |
}); | |
..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment