验证中...
开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约
Languages: Objective-C
Categories: iOS 组件
Latest update 2018-12-09 10:00
Snippet 1 Snippet 2
main.m
Raw Copy
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
CFAbsoluteTime StartTime;
int main(int argc, char * argv[]) {
StartTime = CFAbsoluteTimeGetCurrent();
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
AppDelegate.m
Raw Copy
extern CFAbsoluteTime StartTime;
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
dispatch_async(dispatch_get_main_queue(), ^{
NSLog(@"app启动时间--%f",(CFAbsoluteTimeGetCurrent() - StartTime));
});
return YES;
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search