Contents

CMClockMakeHostTimeFromSystemUnits(_:)

Converts a host time from native units to a core media time structure.

Declaration

func CMClockMakeHostTimeFromSystemUnits(_ hostTime: UInt64) -> CMTime

Parameters

  • hostTime:

    The host time, in native units, to convert.

Discussion

The return value has a large integer timescale (for example, nanoseconds). This function handles situations where the 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