---
title: "CMSyncGetTime(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmsyncgettime(_:)"
---

# CMSyncGetTime(_:)

Returns the time from a clock or timebase.

## Declaration

```swift
func CMSyncGetTime(_ clockOrTimebase: CMClockOrTimebase) -> CMTime
```

## Discussion

Discussion CMSyncGetTime calls either CMClockGetTime(_:) or CMTimebaseGetTime(_:), as appropriate.

## See Also

### Getting and Syncing Time

- [CMSyncGetRelativeRate(_:relativeTo:)](coremedia/cmsyncgetrelativerate(_:relativeto:).md)
- [CMSyncGetRelativeRateAndAnchorTime(_:relativeTo:relativeRateOut:anchorTimeOut:relativeToAnchorTimeOut:)](coremedia/cmsyncgetrelativerateandanchortime(_:relativeto:relativerateout:anchortimeout:relativetoanchortimeout:).md)
- [CMSyncConvertTime(_:from:to:)](coremedia/cmsyncconverttime(_:from:to:).md)
