Structureswift 6.0.1_Concurrency
Instant
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct Instant
Other members in extension
Type members
init(
) static var now: SuspendingClock.Instant
The current instant accounting for machine suspension.
Instance members
var minimumResolution: Duration
The minimum non-zero resolution between any two calls to
now
.var now: SuspendingClock.Instant
The current instant accounting for machine suspension.
func sleep(until: SuspendingClock.Instant, tolerance: Duration?
) async throws Suspend task execution until a given deadline within a tolerance. If no tolerance is specified then the system may adjust the deadline to coalesce CPU wake-ups to more efficiently process the wake-ups in a more power efficient manner.
Citizens in _Concurrency
Conformances
protocol Comparable
A type that can be compared using the relational operators
<
,<=
,>=
, and>
.protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Escapable
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol InstantProtocol<Duration>
protocol Sendable
Type members
init(from: any Decoder
) throws static var now: SuspendingClock.Instant
static func + (lhs: SuspendingClock.Instant, rhs: Duration
) -> SuspendingClock.Instant static func += (lhs: inout SuspendingClock.Instant, rhs: Duration
) static func - (lhs: SuspendingClock.Instant, rhs: Duration
) -> SuspendingClock.Instant static func - (lhs: SuspendingClock.Instant, rhs: SuspendingClock.Instant
) -> Duration static func -= (lhs: inout SuspendingClock.Instant, rhs: Duration
) static func < (lhs: SuspendingClock.Instant, rhs: SuspendingClock.Instant
) -> Bool static func == (lhs: SuspendingClock.Instant, rhs: SuspendingClock.Instant
) -> Bool
Instance members
func advanced(by: Duration
) -> SuspendingClock.Instant func duration(to: SuspendingClock.Instant
) -> Duration func hash(into: inout Hasher
)
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.
static func ... (minimum: Self
) -> PartialRangeFrom<Self> Returns a partial range extending upward from a lower bound.
static func ... (maximum: Self
) -> PartialRangeThrough<Self> Returns a partial range up to, and including, its upper bound.
static func ... (minimum: Self, maximum: Self
) -> ClosedRange<Self> Returns a closed range that contains both of its bounds.
static func ..< (maximum: Self
) -> PartialRangeUpTo<Self> Returns a partial range up to, but not including, its upper bound.
static func ..< (minimum: Self, maximum: Self
) -> Range<Self> Returns a half-open range that contains its lower bound but not its upper bound.
static func <= (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is less than or equal to that of the second argument.
static func > (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than that of the second argument.
static func >= (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether the value of the first argument is greater than or equal to that of the second argument.
Extension in Testing
Type members
Show system interfaces (1)
Hide system interfaces
init(Test.Clock.Instant
) Initialize this instant to the equivalent of the same instant on the testing library’s clock.