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

# rate(relativeTo:)

Queries the relative rate of one timebase or clock relative to another timebase or clock.

## Declaration

```swift
func rate<T>(relativeTo clockOrTimebase: T) -> Double where T : CMSyncProtocol
```

## Parameters

- `clockOrTimebase`: The clock to compare to.

## See Also

### Getting the Time Rate

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