Swiftprotocollibswift_Concurrency

protocol Swift.Clock

Members 9

  1. varstatic var continuous: ContinuousClock { get }
  2. varstatic var suspending: SuspendingClock { get }
  3. associatedtypeassociatedtype Duration
  4. associatedtypeassociatedtype Instant
  5. funcClock.measure(() throws -> ()) throws -> A.Duration
  6. funcClock.measure(() async throws -> ()) async throws -> A.Duration
  7. funcmethod descriptor for Clock.sleep(until: A.Instant, tolerance: A.Duration?) async throws -> ()
  8. varvar minimumResolution: A.Duration { get }
  9. varvar now: A.Instant { get }
protocol Clock where Self.Duration == Self.Instant.Duration, Self.Instant: Swift.InstantProtocol {
    associatedtype Duration
    associatedtype Instant

    var minimumResolution: Self.Duration {
        get
    }
    var now: Self.Instant {
        get
    }

    func sleep(until: Self.Instant, tolerance: Self.Duration?) async throws
}
extension Swift.Clock where Self == Swift.ContinuousClock {
    static var continuous: Swift.ContinuousClock {
        get
    }
}
extension Swift.Clock where Self == Swift.SuspendingClock {
    static var suspending: Swift.SuspendingClock {
        get
    }
}
extension Swift.Clock {
    func measure(_: () throws -> ()) throws -> Self.Duration
    func measure(_: () async throws -> ()) async throws -> Self.Duration
}