Instance Propertyswift 6.0.1_Concurrency
now
The current instant accounting for machine suspension.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
var now: SuspendingClock.Instant { get }
Other members in extension
Types
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
.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.