---
title: "CMClockConvertHostTimeToSystemUnits(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmclockconverthosttimetosystemunits(_:)"
---

# CMClockConvertHostTimeToSystemUnits(_:)

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

## Declaration

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

## Parameters

- `hostTime`: The host time to convert.

## Discussion

Discussion This function performs a scale conversion, not a clock conversion. It can be more accurate than CMTimeConvertScale(_:timescale:method:) because the system units may have a non-integer timescale. In macOS, this function converts to the units of mach_absolute_time.

## See Also

### Accessing and Converting Time

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