目录

dispatch_walltime

功能描述

类似dispatch_time,但是时间系统使用墙上时间(wall time)。墙上时间基于gettimeofday。

dispatch_time则是使用单调时间(monotonic time)。

函数原型

dispatch_time_t dispatch_walltime(const struct timespec *when, int64_t delta);

参数

名称

类型

描述

when

const struct timespec *

一个struct timespec。如果传入NULL,则自动调用gettimeofday获得当前时间。

delta

int64_t

纳秒为单位的偏移时间。

返回

类型

描述

dispatch_time_t

一个新的dispatch_time_t。