<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMTIME_IS_POSITIVEINFINITY(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "s:9CoreMedia26CMTIME_IS_POSITIVEINFINITYySbSo6CMTimeaF"
  },
  "title" : "CMTIME_IS_POSITIVEINFINITY(_:)"
}
-->

# CMTIME_IS_POSITIVEINFINITY(_:)

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

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

## Parameters

`time`

A time value to test.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the time represents positive infinity; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

Use this macro instead of testing if a time is equal to [`positiveInfinity`](/documentation/CoreMedia/CMTime/positiveInfinity), because there are many times that represent positive infinity. This is because the system ignores nonflags fields, so they can contain anything.

---

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)