We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 10eb0e4 + 003a7b8 commit 787dd92Copy full SHA for 787dd92
src/swift/Time.swift
@@ -37,6 +37,12 @@ public struct DispatchTime : Comparable {
37
/// - uptimeNanoseconds: The number of nanoseconds since boot, excluding
38
/// time the system spent asleep
39
/// - Returns: A new `DispatchTime`
40
+ /// - Discussion: This clock is the same as the value returned by
41
+ /// `mach_absolute_time` when converted into nanoseconds.
42
+ /// Note that `DispatchTime(uptimeNanoseconds: 0)` is
43
+ /// equivalent to `DispatchTime.now()`, that is, its value
44
+ /// represents the number of nanoseconds since boot (excluding
45
+ /// system sleep time), not zero nanoseconds since boot.
46
public init(uptimeNanoseconds: UInt64) {
47
self.rawValue = dispatch_time_t(uptimeNanoseconds)
48
}
0 commit comments