Contents

CMTimeGetSeconds(_:)

Returns a representation of the time in seconds.

Declaration

func CMTimeGetSeconds(_ time: CMTime) -> Float64

Parameters

  • time:

    A time value for which to retrieve seconds.

Return Value

The time in seconds.

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