单军华
2017-07-12 20d1260d26b028897f3c0935c12fc35aa37b2e93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
//  GCDTimer.h
//  GCD
//
//  用法
//  http://www.cnblogs.com/YouXianMing/p/3659204.html
//
//  Created by XianMingYou on 15/3/15.
//  Copyright (c) 2015年 XianMingYou. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
@class GCDQueue;
 
@interface GCDTimer : NSObject
 
@property (strong, readonly, nonatomic) dispatch_source_t dispatchSource;
 
#pragma 初始化
- (instancetype)init;
- (instancetype)initInQueue:(GCDQueue *)queue;
 
#pragma mark - 用法
- (void)event:(dispatch_block_t)block timeInterval:(uint64_t)interval;
- (void)event:(dispatch_block_t)block timeInterval:(uint64_t)interval delay:(uint64_t)delay;
- (void)event:(dispatch_block_t)block timeIntervalWithSecs:(float)secs;
- (void)event:(dispatch_block_t)block timeIntervalWithSecs:(float)secs delaySecs:(float)delaySecs;
- (void)start;
- (void)destroy;
 
@end