---
title: "CMTimeRangeContainsTime(_:time:)"
framework: Core Media
role: symbol
role_heading: Function
platforms: [iOS 4.0+, iPadOS 4.0+, Mac Catalyst 13.1+, macOS 10.7+, tvOS 9.0+, visionOS 1.0+, watchOS 6.0+]
path: "coremedia/cmtimerangecontainstime(_:time:)"
---

# CMTimeRangeContainsTime(_:time:)

Returns a Boolean value that indicates whether a time range contains a time.

## Declaration

```swift
func CMTimeRangeContainsTime(_ range: CMTimeRange, time: CMTime) -> Bool
```

## Parameters

- `range`: A time range.
- `time`: A time value to test for in the time range.

## Return Value

Return Value true if range contains the time value; otherwise, false.

## See Also

### Comparing Time Ranges

- [CMTimeRangeEqual(_:_:)](coremedia/cmtimerangeequal(_:_:).md)
- [CMTimeRangeContainsTimeRange(_:otherRange:)](coremedia/cmtimerangecontainstimerange(_:otherrange:).md)
