Function

CMTimeGetSeconds(_:)

Converts a `CMTime` to seconds.

Parameters

`time`

`CMTime` to be converted.

Return Value

The resulting Float64 number of seconds.

Discussion

If the `CMTime` is invalid or indefinite, NaN is returned. If the `CMTime` is infinite, +/- infinity is returned. If the `CMTime` is numeric, epoch is ignored, and time.value / time.timescale is returned. The division is done in Float64, so the fraction is not lost in the returned result.

Inspecting and Evaluating Times

`func CMTimeCompare(CMTime, CMTime) -> Int32`

Returns the numerical relationship of two `CMTimes`.

`func CMTimeAbsoluteValue(CMTime) -> CMTime`

Returns the absolute value of a `CMTime`.

`func CMTimeMaximum(CMTime, CMTime) -> CMTime`

Returns the greater of two `CMTimes` (as defined by `CMTimeCompare(_:_:)`).

`func CMTIME_IS_VALID(CMTime) -> Bool`

Returns a Boolean value that indicates whether a given time is valid.

`func CMTIME_IS_INVALID(CMTime) -> Bool`

Returns a Boolean value that indicates whether a given time is invalid.

`func CMTIME_IS_POSITIVEINFINITY(CMTime) -> Bool`

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

`func CMTIME_IS_NEGATIVEINFINITY(CMTime) -> Bool`

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

`func CMTIME_IS_INDEFINITE(CMTime) -> Bool`

Returns a Boolean value that indicates whether a given time is indefinite.

`func CMTIME_IS_NUMERIC(CMTime) -> Bool`

Returns a Boolean value that indicates whether a given time is numeric.

`func CMTIME_HAS_BEEN_ROUNDED(CMTime) -> Bool`

Returns a Boolean value that indicates whether a given time has been rounded.