Function

CMClockMakeHostTimeFromSystemUnits

Converts a host time from native units to CMTime.

Declaration

CMTime CMClockMakeHostTimeFromSystemUnits(uint64_t hostTime);

Discussion

The returned value will have a large integer timescale (eg, nanoseconds). This function handles situations where host time's native units use a non-integer timescale. In macOS, this function converts from the units of mach_absolute_time.

See Also

Accessing and Converting Time

CMClockGetTime

Retrieves the current time from a clock.

CMClockGetAnchorTime

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

CMClockConvertHostTimeToSystemUnits

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