<!--
{
  "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/CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@F@CMClockGetAnchorTime"
  },
  "title" : "CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)"
}
-->

# CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)

Returns the current time from a clock and the matching time from the clock’s reference clock.

```
func CMClockGetAnchorTime(_ clock: CMClock, clockTimeOut: UnsafeMutablePointer<CMTime>, referenceClockTimeOut: UnsafeMutablePointer<CMTime>) -> OSStatus
```

## Parameters

`clock`

The clock to retrieve the current time from.

`clockTimeOut`

On output, points to the current time.

`referenceClockTimeOut`

On output, points to the reference clock time.

## Discussion

To make practical use of this, you may need to know what the clock’s reference clock is.

---

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)