Use CACurrentMediaTime for performance benchmarks (#2185)

This commit is contained in:
Adlai Holler 2016-09-02 18:42:39 -07:00 committed by GitHub
parent 5c42bb4e2f
commit 2c8a2d0bbd

View File

@ -100,9 +100,9 @@
@autoreleasepool {
block(^{
ASDisplayNodeAssert(start == 0, @"Called startMeasuring block twice.");
start = CFAbsoluteTimeGetCurrent();
start = CACurrentMediaTime();
}, ^{
time += (CFAbsoluteTimeGetCurrent() - start);
time += (CACurrentMediaTime() - start);
ASDisplayNodeAssert(calledStop == NO, @"Called stopMeasuring block twice.");
ASDisplayNodeAssert(start != 0, @"Failed to call startMeasuring block");
calledStop = YES;