<!--
{
  "availability" : [
    "iOS: 6.0.0 -",
    "iPadOS: 6.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMClockConvertHostTimeToSystemUnits(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMClockConvertHostTimeToSystemUnits"
  },
  "title" : "CMClockConvertHostTimeToSystemUnits(_:)"
}
-->

# CMClockConvertHostTimeToSystemUnits(_:)

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

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

## Parameters

`hostTime`

The host time to convert.

## Discussion

This function performs a scale conversion, not a clock conversion. It can be more accurate than [`CMTimeConvertScale(_:timescale:method:)`](/documentation/CoreMedia/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`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)