#include <dispatch/time.h> also included by <dispatch/dispatch.h>

dispatch/time.h

for HeaderDoc
7 macros · 2 functions · 1 typedef · 1 enum

macroMSEC_PER_SEC

#define MSEC_PER_SEC 1000ull

macroNSEC_PER_SEC

#define NSEC_PER_SEC 1000000000ull

macroNSEC_PER_MSEC

#define NSEC_PER_MSEC 1000000ull

macroUSEC_PER_SEC

#define USEC_PER_SEC 1000000ull

macroNSEC_PER_USEC

#define NSEC_PER_USEC 1000ull

typedefdispatch_time_t

@typedef dispatch_time_t @abstract A somewhat abstract representation of time; where zero means "now" and DISPATCH_TIME_FOREVER means "infinity" and every value in between is an opaque encoding.
typedef uint64_t dispatch_time_t

enum(anonymous)

underlying type unsigned long
DISPATCH_WALLTIME_NOW18446744073709551614

macroDISPATCH_TIME_NOW

#define DISPATCH_TIME_NOW (0ull)

macroDISPATCH_TIME_FOREVER

#define DISPATCH_TIME_FOREVER (~0ull)

functiondispatch_time

API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT dispatch_time_t dispatch_time(
	dispatch_time_t when,
	int64_t delta
)
@function dispatch_time @abstract Create a dispatch_time_t relative to the current value of the default or wall time clock, or modify an existing dispatch_time_t. @discussion On Apple platforms, the default clock is based on mach_absolute_time(). @param when An optional dispatch_time_t to add nanoseconds to. If DISPATCH_TIME_NOW is passed, then dispatch_time() will use the default clock (which is based on mach_absolute_time() on Apple platforms). If DISPATCH_WALLTIME_NOW is used, dispatch_time() will use the value returned by gettimeofday(3). dispatch_time(DISPATCH_WALLTIME_NOW, delta) is equivalent to dispatch_walltime(NULL, delta). @param delta Nanoseconds to add. @result A new dispatch_time_t.

functiondispatch_walltime

API_AVAILABLE(macos(10.6), ios(4.0)) DISPATCH_EXPORT DISPATCH_WARN_RESULT DISPATCH_NOTHROW DISPATCH_REFINED_FOR_SWIFT dispatch_time_t dispatch_walltime(
	const struct timespec *_Nullable when,
	int64_t delta
)
@function dispatch_walltime @abstract Create a dispatch_time_t using the wall clock. @discussion On Mac OS X the wall clock is based on gettimeofday(3). @param when A struct timespec to add time to. If NULL is passed, then dispatch_walltime() will use the result of gettimeofday(3). dispatch_walltime(NULL, delta) returns the same value as dispatch_time(DISPATCH_WALLTIME_NOW, delta). @param delta Nanoseconds to add. @result A new dispatch_time_t.