Use CACurrentMediaTime instead of CFAbsoluteTime

This commit is contained in:
Adlai Holler
2016-11-20 16:06:48 +09:00
parent 1b0b9e4830
commit e923943e8c
2 changed files with 3 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c)
andHandler:^(ASDisplayNode * _Nonnull dequeuedItem, BOOL isQueueDrained) {
[dequeuedItem _recursivelyTriggerDisplayAndBlock:NO];
if (isQueueDrained) {
CFAbsoluteTime timestamp = CFAbsoluteTimeGetCurrent();
CFTimeInterval timestamp = CACurrentMediaTime();
[[NSNotificationCenter defaultCenter] postNotificationName:ASRenderingEngineDidDisplayScheduledNodesNotification
object:nil
userInfo:@{ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp: @(timestamp)}];

View File

@@ -34,7 +34,7 @@
ASLayoutRangeMode _currentRangeMode;
BOOL _didUpdateCurrentRange;
BOOL _didRegisterForNodeDisplayNotifications;
CFAbsoluteTime _pendingDisplayNodesTimestamp;
CFTimeInterval _pendingDisplayNodesTimestamp;
#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ
NSUInteger _updateCountThisFrame;
@@ -335,7 +335,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive;
if (nodeShouldScheduleDisplay) {
[self registerForNodeDisplayNotificationsForInterfaceStateIfNeeded:selfInterfaceState];
if (_didRegisterForNodeDisplayNotifications) {
_pendingDisplayNodesTimestamp = CFAbsoluteTimeGetCurrent();
_pendingDisplayNodesTimestamp = CACurrentMediaTime();
}
}
}