OC统计代码执行时间,单位为毫秒

double start = CFAbsoluteTimeGetCurrent()*1000;

    NSLog(@"start time =%f",start );

    double end = CFAbsoluteTimeGetCurrent()*1000;

    NSLog(@"end time =%f",end );

    NSLog(@"use time =%f millisecond ", (end-start));


输出结果:

start time =448113226107.433960

end time =448113227112.819031

use time =1005.385071millisecond

你可能感兴趣的:(OC统计代码执行时间,单位为毫秒)