mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Use CACurrentMediaTime instead of CFAbsoluteTime
This commit is contained in:
@@ -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)}];
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user