美文网首页
调试函数耗时的利器CFAbsoluteTimeGetCurren

调试函数耗时的利器CFAbsoluteTimeGetCurren

作者: WeeverLu | 来源:发表于2016-05-31 16:21 被阅读393次
        CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
        // do something
        CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();
        NSLog(@"time cost: %0.3f", end - start);
    

    类型说明:
    CFAbsoluteTimedouble类型

    typedef double CFTimeInterval;
    typedef CFTimeInterval CFAbsoluteTime;
    /* absolute time is the time interval since the reference date */
    /* the reference date (epoch) is 00:00:00 1 January 2001. */
    

    相关文章

      网友评论

          本文标题:调试函数耗时的利器CFAbsoluteTimeGetCurren

          本文链接:https://www.haomeiwen.com/subject/lancdttx.html