Skip to content

Commit ceeceaa

Browse files
authored
Merge pull request #33342 from compnerd/dispatch-interval-units
Dispatch: correct `DispatchTimeInterval` calculation on ASi
2 parents 6d47061 + d30366f commit ceeceaa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/Darwin/Dispatch/Schedulers+DispatchQueue.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ extension DispatchTime /* : Strideable */ {
4545
typealias Stride = DispatchTimeInterval
4646

4747
public func distance(to other: DispatchTime) -> DispatchTimeInterval {
48-
let lhs = other.rawValue
49-
let rhs = rawValue
48+
let lhs = other.uptimeNanoseconds
49+
let rhs = uptimeNanoseconds
5050
if lhs >= rhs {
5151
return DispatchTimeInterval.nanoseconds(Int(lhs - rhs))
5252
} else {

0 commit comments

Comments
 (0)