CMTimeCompare(_:_:)
Returns the numerical relationship of two times.
Declaration
func CMTimeCompare(_ time1: CMTime, _ time2: CMTime) -> Int32Parameters
- time1:
A time to compare.
- time2:
Another time to compare.
Return Value
A numeric value that indicates the relative order of the times.
Discussion
This method returns the following values depending on the relationship of the time values:
If
time1is less thantime2, it returns-1.If
time1is greater thantime2, it returns1.If
time1andtime2are equal, it returns0.
To sort numeric and nonnumeric times consistently, this call uses the following sort rules:
-infinity < all finite values < indefinite < +infinity < invalid
Times with numerically larger epochs are greater than those with smaller epochs. ``