Skip to content

Commit f6fbd11

Browse files
committed
Don't crash when comparing DispatchWallTimes with <
1 parent ba7802e commit f6fbd11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swift/Time.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public struct DispatchWallTime : Comparable {
7676

7777
public func <(a: DispatchWallTime, b: DispatchWallTime) -> Bool {
7878
if a.rawValue == ~0 || b.rawValue == ~0 { return false }
79-
return -Int64(a.rawValue) < -Int64(b.rawValue)
79+
return -Int64(bitPattern: a.rawValue) < -Int64(bitPattern: b.rawValue)
8080
}
8181

8282
public func ==(a: DispatchWallTime, b: DispatchWallTime) -> Bool {

0 commit comments

Comments
 (0)