Initializer
init(uptimeNanoseconds:)
Creates a
DispatchTime relative to the system clock that ticks since boot.init(uptimeNanoseconds: UInt64)
Parameters
uptimeNanosecondsThe number of nanoseconds since boot, excluding time the system spent asleep
Return Value
A new DispatchTime
Discussion
Discussion: This clock is the same as the value returned by
mach_absolute_timewhen converted into nanoseconds. On some platforms, the nanosecond value is rounded up to a multiple of the Mach timebase, using the conversion factors returned bymach_timebase_info(). The nanosecond equivalent of the rounded result can be obtained by reading theuptimeNanosecondsproperty. Note thatDispatchTime(uptimeNanoseconds: 0)is equivalent toDispatchTime.now(), that is, its value represents the number of nanoseconds since boot (excluding system sleep time), not zero nanoseconds since boot.