//
//  GCDTimer.h
//  Temperature
//
//  Created by RD on 2023/1/10.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN



@interface GCDTimer : NSObject

/// 创建timer
/// - Parameters:
///   - interval: 间隔、周期，单位秒，double类型
///   - afterTime: 开始时间，单位秒，double类型
///   - repeats: 是否重复执行
///   - block: timer执行的block
- (void)scheduledTimerWithTimeInterval:(NSTimeInterval)interval afterTime:(NSTimeInterval)afterTime repeats:(BOOL)repeats block:(void (^)(void))block;

/// 暂停
- (void)pauseTimer;

/// 开始
- (void)resumeTimer;

/// 重新开始
- (void)restartTimer;

/// 取消
- (void)stopTimer;
@end

NS_ASSUME_NONNULL_END
