Structureswift 6.0.1_Concurrency
Instant
A continuous point in time used for ContinuousClock
.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
struct Instant
Other members in extension
Type members
init(
) static var now: ContinuousClock.Instant
The current continuous instant.
Instance members
var minimumResolution: Duration
The minimum non-zero resolution between any two calls to
now
.var now: ContinuousClock.Instant
The current continuous instant.
func sleep(until: ContinuousClock.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: ContinuousClock.Instant
static func + (lhs: ContinuousClock.Instant, rhs: Duration
) -> ContinuousClock.Instant static func += (lhs: inout ContinuousClock.Instant, rhs: Duration
) static func - (lhs: ContinuousClock.Instant, rhs: Duration
) -> ContinuousClock.Instant static func - (lhs: ContinuousClock.Instant, rhs: ContinuousClock.Instant
) -> Duration static func -= (lhs: inout ContinuousClock.Instant, rhs: Duration
) static func < (lhs: ContinuousClock.Instant, rhs: ContinuousClock.Instant
) -> Bool static func == (lhs: ContinuousClock.Instant, rhs: ContinuousClock.Instant
) -> Bool
Instance members
func advanced(by: Duration
) -> ContinuousClock.Instant func duration(to: ContinuousClock.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.