blob: b78501e9e66f307854a0338c65fd0457861520c4 [file] [log] [blame]
Anders Carlsson7bca8ca2018-08-30 07:30:291/*
2 * Copyright 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#import <Foundation/Foundation.h>
12
13// RTCDisplayLinkTimer wraps a CADisplayLink and is set to fire every two screen
14// refreshes, which should be 30fps. We wrap the display link in order to avoid
15// a retain cycle since CADisplayLink takes a strong reference onto its target.
16// The timer is paused by default.
17@interface RTCDisplayLinkTimer : NSObject
18
19@property(nonatomic) BOOL isPaused;
20
21- (instancetype)initWithTimerHandler:(void (^)(void))timerHandler;
22- (void)invalidate;
23
24@end