iOS----------计算一段代码执行时间

CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();

//在这写入要计算时间的代码

// do something

CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();

NSLog(@"%f", end - start);

猜你喜欢

转载自www.cnblogs.com/KiVen2015/p/8926265.html
今日推荐