Static Propertynmggithub.kass 3.2.4MachCore
system
The system clock in the current host.
static var system: Clock { get throws }
The system clock in the current host.
static var system: Clock { get throws }
import MachCore
The core module for interacting with the Mach kernel.
class Clock
A clock.
struct Mach
The Mach kernel.
convenience init(_ type: Mach.ClockType, onHost host: Mach.Host) throws
Obtains the given clock.
struct ClockType
A type of clock.
static var calendar: Clock { get throws }
The calendar clock in the current host.
var clockAttributes: Mach.ClockAttributeManager { get }
The clock attributes.
var minimumResolution: Duration { get }
Unsafe. The minimum resolution of the clock.
var now: Instant { get }
Unsafe. The current time of the clock.
var time: mach_timespec_t { get throws }
The current time of the clock.
@discardableResult func sleep(for time: mach_timespec_t) throws -> mach_timespec_t
Sleeps on the clock for the given time.
@discardableResult func sleep(until time: mach_timespec_t) throws -> mach_timespec_t
Sleeps on the clock until the given time.
func sleep(until time: Instant, tolerance: Duration?) async
Unsafe. Sleeps until a given time.
struct Duration
struct Instant