Skip to content

Commit 7fb9d5c

Browse files
authored
Merge pull request #788 from apple/maxd/sendable-timeinterval
2 parents a5167e2 + 7c19a4f commit 7fb9d5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/swift/Time.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import CDispatch
1818

19-
public struct DispatchTime : Comparable {
19+
public struct DispatchTime : Comparable, Sendable {
2020
#if HAVE_MACH
2121
private static let timebaseInfo: mach_timebase_info_data_t = {
2222
var info = mach_timebase_info_data_t(numer: 1, denom: 1)
@@ -96,7 +96,7 @@ extension DispatchTime {
9696
}
9797
}
9898

99-
public struct DispatchWallTime : Comparable {
99+
public struct DispatchWallTime : Comparable, Sendable {
100100
public let rawValue: dispatch_time_t
101101

102102
public static func now() -> DispatchWallTime {
@@ -165,7 +165,7 @@ private func toInt64Clamped(_ value: Double) -> Int64 {
165165
/// let t1 = DispatchTimeInterval.seconds(Int.max)
166166
/// let t2 = DispatchTimeInterval.milliseconds(Int.max)
167167
/// let result = t1 == t2 // true
168-
public enum DispatchTimeInterval: Equatable {
168+
public enum DispatchTimeInterval: Equatable, Sendable {
169169
case seconds(Int)
170170
case milliseconds(Int)
171171
case microseconds(Int)

0 commit comments

Comments
 (0)