// // 设置定时器
可以如下创建相应的dispatch source:
使用 dispatch_source_create 函数创建dispatch source
配置dispatch source:
为dispatch source设置一个事件处理器
对于定时器源,使用 dispatch_source_set_timer 函数设置定时器信息
dispatch_source_set_event_handler事件处理器
// // 设置定时器
可以如下创建相应的dispatch source:
使用 dispatch_source_create 函数创建dispatch source
配置dispatch source:
为dispatch source设置一个事件处理器
对于定时器源,使用 dispatch_source_set_timer 函数设置定时器信息
dispatch_source_set_event_handler事件处理器