iOS計算一段代碼執行時間

CFAbsoluteTime startTime =CFAbsoluteTimeGetCurrent(); //在這寫入要計算時間的代碼 ... CFAbsoluteTime linkTime = (CFAbsoluteTimeGetCurrent() - startTime); NSLog(@"Linked in %f ms", linkTime *1000.0);
相關文章
相關標籤/搜索