Retrieves the current time from a clock and also the matching time from the clock's reference clock.


func CMClockGetAnchorTime(_ clock: CMClock, clockTimeOut: UnsafeMutablePointer<CMTime>, referenceClockTimeOut: UnsafeMutablePointer<CMTime>) -> OSStatus


To make practical use of this, you may need to know what the clock's reference clock is.

See Also

Accessing and Converting Time

func CMClockGetTime(CMClock) -> CMTime

Retrieves the current time from a clock.

func CMClockConvertHostTimeToSystemUnits(CMTime) -> UInt64

Converts a host time from CMTime to the host time's native units.

func CMClockMakeHostTimeFromSystemUnits(UInt64) -> CMTime

Converts a host time from native units to CMTime.