Swiftprotocollibswift_Concurrency
protocol Swift.Clock
Members 9
- var
static var continuous: ContinuousClock { get } - var
static var suspending: SuspendingClock { get } - associatedtype
associatedtype Duration - associatedtype
associatedtype Instant - func
Clock.measure(() throws -> ()) throws -> A.Duration - func
Clock.measure(() async throws -> ()) async throws -> A.Duration - func
method descriptor for Clock.sleep(until: A.Instant, tolerance: A.Duration?) async throws -> () - var
var minimumResolution: A.Duration { get } - var
var now: A.Instant { get }
Header
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 }