Initializerswift 6.1.2_Concurrency
init
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
init()
init()
import _Concurrency
struct ContinuousClock
A clock that measures time that always increments and does not stop incrementing while the system is asleep.
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
.
var now: ContinuousClock.Instant { get }
The current continuous instant.
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.
struct Instant
A continuous point in time used for ContinuousClock
.