From af5c6c2680524ecb41d3473878caa5186281c2b3 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Fri, 16 Aug 2024 20:11:26 -0500 Subject: [PATCH] Make AnyClock a class. --- Sources/Clocks/AnyClock.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Clocks/AnyClock.swift b/Sources/Clocks/AnyClock.swift index f9f8cfd6..4072d954 100644 --- a/Sources/Clocks/AnyClock.swift +++ b/Sources/Clocks/AnyClock.swift @@ -33,7 +33,7 @@ /// } /// ``` @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) - public struct AnyClock: Clock { + public final class AnyClock: Clock { public struct Instant: InstantProtocol { fileprivate let offset: Duration @@ -50,9 +50,9 @@ } } - private var _minimumResolution: @Sendable () -> Duration - private var _now: @Sendable () -> Instant - private var _sleep: @Sendable (Instant, Duration?) async throws -> Void + private let _minimumResolution: @Sendable () -> Duration + private let _now: @Sendable () -> Instant + private let _sleep: @Sendable (Instant, Duration?) async throws -> Void public init(_ clock: C) where C.Instant.Duration == Duration { let start = clock.now