---
title: "CMTimeGetSeconds(_:)"
framework: coremedia
role: symbol
role_heading: Function
path: "coremedia/cmtimegetseconds(_:)"
---

# CMTimeGetSeconds(_:)

Returns a representation of the time in seconds.

## Declaration

```swift
func CMTimeGetSeconds(_ time: CMTime) -> Float64
```

## Parameters

- `time`: A time value for which to retrieve seconds.

## Return Value

Return Value The time in seconds.

## Discussion

Discussion If the time is invalid or indefinite, the result is nan. If the time is infinite, the result is positive or negative infinity. If the time is numeric, it ignores the epoch, and returns the result of time.value / time.timescale. It performs the division in Float64, so the fraction isn’t lost in the returned result.

## See Also

### Inspecting a Time

- [CMTimeAbsoluteValue(_:)](coremedia/cmtimeabsolutevalue(_:).md)
- [CMTIME_IS_VALID(_:)](coremedia/cmtime_is_valid(_:).md)
- [CMTIME_IS_INVALID(_:)](coremedia/cmtime_is_invalid(_:).md)
- [CMTIME_IS_POSITIVEINFINITY(_:)](coremedia/cmtime_is_positiveinfinity(_:).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)
