Converts a host time from native units to CMTime
.
SDKs
- iOS 6.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
Framework
- Core Media
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.