<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMSyncProtocol",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:9CoreMedia14CMSyncProtocolP"
  },
  "title" : "CMSyncProtocol"
}
-->

# CMSyncProtocol

A type that provides behavior for syncing time.

```
protocol CMSyncProtocol : Sendable
```

## Topics

### Getting the Time

[`var time: CMTime`](/documentation/CoreMedia/CMSyncProtocol/time)

The current time.

### Converting Time

[`func convertTime<T>(CMTime, to: T) -> CMTime`](/documentation/CoreMedia/CMSyncProtocol/convertTime(_:to:))

Converts a time from one timebase or clock to another timebase or clock.

### Getting the Time Rate

[`func rate<T>(relativeTo: T) -> Double`](/documentation/CoreMedia/CMSyncProtocol/rate(relativeTo:))

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

[`func rateAndAnchorTime<T>(relativeTo: T) throws -> (rate: Double, anchorTime: CMTime, referenceTime: CMTime)`](/documentation/CoreMedia/CMSyncProtocol/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.

### Determining Time Drift

[`func mightDrift<T>(relativeTo: T) -> Bool`](/documentation/CoreMedia/CMSyncProtocol/mightDrift(relativeTo:))

Returns a Boolean value that indicates whether it’s possible for the clock to drift relative to the input.

## Relationships

### Conforming Types

[`CMTimebase`](/documentation/CoreMedia/CMTimebase)

[`CMClock`](/documentation/CoreMedia/CMClock)

### Inherits From

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)