@@ -30,7 +30,7 @@ import Swift
3030///
3131/// For more information about specific clocks see `ContinuousClock` and
3232/// `SuspendingClock`.
33- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
33+ @available ( StdlibDeploymentTarget 5 . 7 , * )
3434public protocol Clock < Duration> : Sendable {
3535 associatedtype Duration
3636 associatedtype Instant : InstantProtocol where Instant. Duration == Duration
@@ -43,7 +43,7 @@ public protocol Clock<Duration>: Sendable {
4343#endif
4444
4545 /// The traits associated with this clock instance.
46- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
46+ @available ( StdlibDeploymentTarget 6 . 2 , * )
4747 var traits : ClockTraits { get }
4848
4949 /// Convert a Clock-specific Duration to a Swift Duration
@@ -59,7 +59,7 @@ public protocol Clock<Duration>: Sendable {
5959 ///
6060 /// Returns: A `Swift.Duration` representing the equivalent duration, or
6161 /// `nil` if this function is not supported.
62- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
62+ @available ( StdlibDeploymentTarget 6 . 2 , * )
6363 func convert( from duration: Duration ) -> Swift . Duration ?
6464
6565 /// Convert a Swift Duration to a Clock-specific Duration
@@ -70,7 +70,7 @@ public protocol Clock<Duration>: Sendable {
7070 ///
7171 /// Returns: A `Duration` representing the equivalent duration, or
7272 /// `nil` if this function is not supported.
73- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
73+ @available ( StdlibDeploymentTarget 6 . 2 , * )
7474 func convert( from duration: Swift . Duration ) -> Duration ?
7575
7676 /// Convert an `Instant` from some other clock's `Instant`
@@ -82,20 +82,20 @@ public protocol Clock<Duration>: Sendable {
8282 ///
8383 /// Returns: An `Instant` representing the equivalent instant, or
8484 /// `nil` if this function is not supported.
85- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
85+ @available ( StdlibDeploymentTarget 6 . 2 , * )
8686 func convert< OtherClock: Clock > ( instant: OtherClock . Instant ,
8787 from clock: OtherClock ) -> Instant ?
8888}
8989
90- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
90+ @available ( StdlibDeploymentTarget 5 . 7 , * )
9191extension Clock {
9292 /// Measure the elapsed time to execute a closure.
9393 ///
9494 /// let clock = ContinuousClock()
9595 /// let elapsed = clock.measure {
9696 /// someWork()
9797 /// }
98- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
98+ @available ( StdlibDeploymentTarget 5 . 7 , * )
9999 public func measure( _ work: ( ) throws -> Void ) rethrows -> Instant . Duration {
100100 let start = now
101101 try work ( )
@@ -109,7 +109,7 @@ extension Clock {
109109 /// let elapsed = await clock.measure {
110110 /// await someWork()
111111 /// }
112- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
112+ @available ( StdlibDeploymentTarget 5 . 7 , * )
113113 @_alwaysEmitIntoClient
114114 public func measure(
115115 isolation: isolated ( any Actor ) ? = #isolation,
@@ -127,7 +127,7 @@ extension Clock {
127127 //
128128 // This function also doubles as an ABI-compatibility shim predating the
129129 // introduction of #isolation.
130- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
130+ @available ( StdlibDeploymentTarget 5 . 7 , * )
131131 @_silgen_name ( " $ss5ClockPsE7measurey8DurationQzyyYaKXEYaKF " )
132132 @_unsafeInheritExecutor // for ABI compatibility
133133 public func _unsafeInheritExecutor_measure(
@@ -140,7 +140,7 @@ extension Clock {
140140 }
141141}
142142
143- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
143+ @available ( StdlibDeploymentTarget 6 . 2 , * )
144144extension Clock {
145145 // For compatibility, return `nil` if this is not implemented
146146 public func convert( from duration: Duration ) -> Swift . Duration ? {
@@ -171,21 +171,21 @@ extension Clock {
171171 }
172172}
173173
174- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
174+ @available ( StdlibDeploymentTarget 6 . 2 , * )
175175extension Clock where Duration == Swift . Duration {
176176 public func convert( from duration: Duration ) -> Duration ? {
177177 return duration
178178 }
179179}
180180
181181#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
182- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
182+ @available ( StdlibDeploymentTarget 5 . 7 , * )
183183extension Clock {
184184 /// Suspends for the given duration.
185185 ///
186186 /// Prefer to use the `sleep(until:tolerance:)` method on `Clock` if you have
187187 /// access to an absolute instant.
188- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
188+ @available ( StdlibDeploymentTarget 5 . 7 , * )
189189 @_alwaysEmitIntoClient
190190 public func sleep(
191191 for duration: Instant . Duration ,
@@ -207,7 +207,7 @@ extension Clock {
207207/// clocks best matches the clock that the user is trying to specify a
208208/// time or delay in. Executors are expected to do this on a best effort
209209/// basis.
210- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
210+ @available ( StdlibDeploymentTarget 6 . 2 , * )
211211public struct ClockTraits : OptionSet {
212212 public let rawValue : UInt32
213213
@@ -225,10 +225,10 @@ public struct ClockTraits: OptionSet {
225225 public static let wallTime = ClockTraits ( rawValue: 1 << 2 )
226226}
227227
228- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
228+ @available ( StdlibDeploymentTarget 6 . 2 , * )
229229extension Clock {
230230 /// The traits associated with this clock instance.
231- @available ( SwiftStdlibCurrentOS 6 . 2 , * )
231+ @available ( StdlibDeploymentTarget 6 . 2 , * )
232232 public var traits : ClockTraits {
233233 return [ ]
234234 }
@@ -239,21 +239,21 @@ enum _ClockID: Int32 {
239239 case suspending = 2
240240}
241241
242- @available ( SwiftStdlibCurrentOS 5 . 7 , * )
242+ @available ( StdlibDeploymentTarget 5 . 7 , * )
243243@_silgen_name ( " swift_get_time " )
244244internal func _getTime(
245245 seconds: UnsafeMutablePointer < Int64 > ,
246246 nanoseconds: UnsafeMutablePointer < Int64 > ,
247247 clock: CInt )
248248
249- @available( SwiftStdlibCurrentOS 5 . 7 , * )
249+ @available( StdlibDeploymentTarget 5 . 7 , * )
250250@_silgen_name ( " swift_get_clock_res " )
251251internal func _getClockRes(
252252 seconds: UnsafeMutablePointer < Int64 > ,
253253 nanoseconds: UnsafeMutablePointer < Int64 > ,
254254 clock: CInt )
255255
256- @available( SwiftStdlibCurrentOS 6 . 2 , * )
256+ @available( StdlibDeploymentTarget 6 . 2 , * )
257257@_silgen_name ( " swift_sleep " )
258258internal func _sleep(
259259 seconds: Int64 ,
0 commit comments