---
title: "CMTimeCopyAsDictionary(_:allocator:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmtimecopyasdictionary(_:allocator:)"
---

# CMTimeCopyAsDictionary(_:allocator:)

Creates a dictionary representation of the time.

## Declaration

```swift
func CMTimeCopyAsDictionary(_ time: CMTime, allocator: CFAllocator?) -> CFDictionary?
```

## Parameters

- `time`: A time from which to create a dictionary.
- `allocator`: An allocator with which to create the dictionary. Pass doc://com.apple.documentation/documentation/CoreFoundation/kCFAllocatorDefault to use the default allocator.

## Return Value

Return Value A dictionary representation of the time.

## See Also

### Representing Times

- [CMTimeShow(_:)](coremedia/cmtimeshow(_:).md)
- [CMTimeCopyDescription(allocator:time:)](coremedia/cmtimecopydescription(allocator:time:).md)
