---
title: "CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmclockgetanchortime(_:clocktimeout:referenceclocktimeout:)"
---

# CMClockGetAnchorTime(_:clockTimeOut:referenceClockTimeOut:)

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

## Declaration

```swift
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

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

## See Also

### Accessing and Converting Time

- [CMClockGetTime(_:)](coremedia/cmclockgettime(_:).md)
- [CMClockConvertHostTimeToSystemUnits(_:)](coremedia/cmclockconverthosttimetosystemunits(_:).md)
- [CMClockMakeHostTimeFromSystemUnits(_:)](coremedia/cmclockmakehosttimefromsystemunits(_:).md)
