Instance Propertyswift 6.0.3_Concurrency
now
The current continuous instant.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
var now: ContinuousClock.Instant { get }
The current continuous instant.
var now: ContinuousClock.Instant { get }
import _Concurrency
struct ContinuousClock
A clock that measures time that always increments and does not stop incrementing while the system is asleep.
struct Instant
A continuous point in time used for ContinuousClock
.
init()
static var now: ContinuousClock.Instant { get }
The current continuous instant.
var minimumResolution: Duration { get }
The minimum non-zero resolution between any two calls to now
.
func sleep(until deadline: ContinuousClock.Instant, tolerance: Duration? = nil) 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.