2019-10-16 20:03:47 +03:00
|
|
|
/*
|
2021-12-31 02:08:43 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2015-03-23 23:28:42 +03:00
|
|
|
*
|
2018-02-17 05:24:55 +03:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-03-23 23:28:42 +03:00
|
|
|
*/
|
2015-02-20 07:10:52 +03:00
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2016-11-23 18:47:52 +03:00
|
|
|
#import <React/RCTBridgeModule.h>
|
|
|
|
#import <React/RCTFrameUpdate.h>
|
2021-05-22 00:48:26 +03:00
|
|
|
#import <React/RCTInitializing.h>
|
2016-11-23 18:47:52 +03:00
|
|
|
#import <React/RCTInvalidating.h>
|
2015-02-20 07:10:52 +03:00
|
|
|
|
2019-09-21 04:25:29 +03:00
|
|
|
@protocol RCTTimingDelegate
|
|
|
|
|
|
|
|
- (void)callTimers:(NSArray<NSNumber *> *)timers;
|
|
|
|
- (void)immediatelyCallTimer:(nonnull NSNumber *)callbackID;
|
|
|
|
- (void)callIdleCallbacks:(nonnull NSNumber *)absoluteFrameStartMS;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
2021-05-22 00:48:26 +03:00
|
|
|
@interface RCTTiming : NSObject <RCTBridgeModule, RCTInvalidating, RCTFrameUpdateObserver, RCTInitializing>
|
2015-02-20 07:10:52 +03:00
|
|
|
|
2020-03-09 08:58:01 +03:00
|
|
|
- (instancetype)initWithDelegate:(id<RCTTimingDelegate>)delegate;
|
2019-09-26 01:29:34 +03:00
|
|
|
- (void)createTimerForNextFrame:(nonnull NSNumber *)callbackID
|
|
|
|
duration:(NSTimeInterval)jsDuration
|
|
|
|
jsSchedulingTime:(NSDate *)jsSchedulingTime
|
|
|
|
repeats:(BOOL)repeats;
|
2019-10-17 04:43:00 +03:00
|
|
|
- (void)deleteTimer:(double)timerID;
|
2019-09-21 04:25:29 +03:00
|
|
|
|
2015-02-20 07:10:52 +03:00
|
|
|
@end
|