---
title: "rateAndAnchorTime(relativeTo:)"
framework: coremedia
role: symbol
role_heading: Instance Method
path: "coremedia/cmsyncprotocol/rateandanchortime(relativeto:)"
---

# rateAndAnchorTime(relativeTo:)

Queries the relative rate of one timebase or clock relative to another timebase or clock, and the times of each timebase or clock at which the relative rate went into effect.

## Declaration

```swift
func rateAndAnchorTime<T>(relativeTo clockOrTimebase: T) throws -> (rate: Double, anchorTime: CMTime, referenceTime: CMTime) where T : CMSyncProtocol
```

## Parameters

- `clockOrTimebase`: The clock to compare to.

## See Also

### Getting the Time Rate

- [rate(relativeTo:)](coremedia/cmsyncprotocol/rate(relativeto:).md)
