You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB

//
// JX_GCDTimer.h
// TimerComparison
//
// Created by Joeyxu on 6/12/15.
// Copyright (c) 2015 com.tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JX_GCDTimerManager : NSObject
+ (JX_GCDTimerManager *)sharedInstance;
/**
timer0.01
@param timerName timer的名称
@param interval
@param queue timer将被放入的队列action执行的队列nil将自动放到一个子线程队列中
@param repeats timer是否循环调用
@param fireInstantly timer的第一次执行是否立刻触发interval的时长才会第一次执行
@param action block
*/
- (void)scheduledDispatchTimerWithName:(NSString *)timerName
timeInterval:(double)interval
queue:(dispatch_queue_t)queue
repeats:(BOOL)repeats
fireInstantly:(BOOL)fireInstantly
action:(dispatch_block_t)dispatchBlock;
/**
timer
@param timerName timer的名称
*/
- (void)cancelTimerWithName:(NSString *)timerName;
/**
* timer
*
* @param timerName timer的唯一名称标识
* @param doExist==YES表示存在
*/
- (void)checkExistTimer:(NSString *)timerName
completion:(void (^)(BOOL doExist))completion;
@end