One Logo Pool Ball
Dispatch · IOS API REFERENCE

DispatchTime

struct · SDK 27.1

struct DispatchTime

Members (7)

get

distantFuture

TypeScript
get distantFuture(): DispatchTime
Swift declaration
static let distantFuture: DispatchTime
init

init

TypeScript
init(uptimeNanoseconds: number): DispatchTime
Swift declaration
init(uptimeNanoseconds: UInt64)

Creates a `DispatchTime` relative to the system clock that ticks since boot. - Parameters: - uptimeNanoseconds: The number of nanoseconds since boot, excluding time the system spent asleep - Returns: A new `DispatchTime` - Discussion: This clock is the same as the value returned by `mach_absolute_time` when converted into nanoseconds. On some platforms, the nanosecond value is rounded up to a multiple of the Mach timebase, using the conversion factors returned by `mach_timebase_info()`. The nanosecond equivalent of the rounded result can be obtained by reading the `uptimeNanoseconds` property. Note that `DispatchTime(uptimeNanoseconds: 0)` is equivalent to `DispatchTime.now()`, that is, its value represents the number of nanoseconds since boot (excluding system sleep time), not zero nanoseconds since boot.

get

uptimeNanoseconds

TypeScript
getUptimeNanoseconds($self: DispatchTime): number
Swift declaration
var uptimeNanoseconds: UInt64 { get }
static

now

TypeScript
now(): DispatchTime
Swift declaration
static func now() -> DispatchTime
method · iOS 13.0+

advanced

TypeScript
advanced($self: DispatchTime, n: DispatchTimeInterval): DispatchTime
Swift declaration
func advanced(by n: DispatchTimeInterval) -> DispatchTime
method · iOS 13.0+

distance

TypeScript
distance($self: DispatchTime, other: DispatchTime): DispatchTimeInterval
Swift declaration
func distance(to other: DispatchTime) -> DispatchTimeInterval
get

rawValue

TypeScript
getRawValue($self: DispatchTime): number
Swift declaration
let rawValue: dispatch_time_t

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

DispatchTime

The iOS SDK compiler rejected this binding: initializer 'init(uptimeNanoseconds:)' has different argument labels from those required by protocol 'RawRepresentable' ('init(rawValue:)')

All Dispatch types →