验证中...
语言: Objective-C
分类: iOS 组件
最后更新于 2018-12-09 10:00
片段 1 片段 2
main.m
原始数据 复制代码
#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
原始数据 复制代码
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;
}

评论列表( 0 )

你可以在登录后,发表评论

搜索帮助