Skip to content

Instantly share code, notes, and snippets.

@vamsiac
Last active August 29, 2015 13:57
Show Gist options
  • Save vamsiac/9834598 to your computer and use it in GitHub Desktop.
Save vamsiac/9834598 to your computer and use it in GitHub Desktop.
//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