---
title: "CMClockMakeHostTimeFromSystemUnits(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmclockmakehosttimefromsystemunits(_:)"
---

# CMClockMakeHostTimeFromSystemUnits(_:)

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

## Declaration

```swift
func CMClockMakeHostTimeFromSystemUnits(_ hostTime: UInt64) -> CMTime
```

## Parameters

- `hostTime`: The host time, in native units, to convert.

## Discussion

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

- [CMClockGetTime(_:)](coremedia/cmclockgettime(_:).md)
- [CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)](coremedia/cmclockgetanchortime(_:clocktimeout:referenceclocktimeout:).md)
- [CMClockConvertHostTimeToSystemUnits(_:)](coremedia/cmclockconverthosttimetosystemunits(_:).md)
