// // 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 @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