---
title: "CMTIME_IS_POSITIVEINFINITY(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmtime_is_positiveinfinity(_:)"
---

# CMTIME_IS_POSITIVEINFINITY(_:)

Returns a Boolean value that indicates whether a given time is positive infinity.

## Declaration

```swift
func CMTIME_IS_POSITIVEINFINITY(_ time: CMTime) -> Bool
```

## Parameters

- `time`: A time value to test.

## Return Value

Return Value true if the time represents positive infinity; otherwise, false.

## Discussion

Discussion Use this macro instead of testing if a time is equal to positiveInfinity, because there are many times that represent positive infinity. This is because the system ignores nonflags fields, so they can contain anything.

## See Also

### Inspecting a Time

- [CMTimeGetSeconds(_:)](coremedia/cmtimegetseconds(_:).md)
- [CMTimeAbsoluteValue(_:)](coremedia/cmtimeabsolutevalue(_:).md)
- [CMTIME_IS_VALID(_:)](coremedia/cmtime_is_valid(_:).md)
- [CMTIME_IS_INVALID(_:)](coremedia/cmtime_is_invalid(_:).md)
- [CMTIME_IS_NEGATIVEINFINITY(_:)](coremedia/cmtime_is_negativeinfinity(_:).md)
- [CMTIME_IS_INDEFINITE(_:)](coremedia/cmtime_is_indefinite(_:).md)
- [CMTIME_IS_NUMERIC(_:)](coremedia/cmtime_is_numeric(_:).md)
- [CMTIME_HAS_BEEN_ROUNDED(_:)](coremedia/cmtime_has_been_rounded(_:).md)
