A timing source object.
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
- Core Media
A clock represents a source of time information: generally, a piece of hardware that measures the passage of time. One example of a clock is the host time clock, accessible via
CMClock. It measures time using the CPU system clock, which in macOS is
mach. Every audio device can also be considered a clock since the audio samples that it outputs or inputs each have a defined duration (eg, 1/48000 of a second for 48 kHz audio).
CMClocks are read-only: they cannot be stopped or started, and the current time cannot be set. A
CMClock has one primary function,
CMClock, which tells what time it is now. Additionally, the
CMSync infrastructure monitors relative drift between