Function

CMClockInvalidate(_:)

Makes the clock stop functioning.

Declaration

func CMClockInvalidate(_ clock: CMClock)

Discussion

After invalidation, the clock will return errors from all APIs. This should only be called by the "owner" of the clock, who knows (for example) that some piece of hardware has gone away, and the clock will no longer work (and might even crash).

See Also

Utility Functions

func CMClockGetTypeID() -> CFTypeID

Returns the CFTypeID of the CMClock.

func CMClockMightDrift(CMClock, otherClock: CMClock) -> Bool

Returns a Boolean that indicates whether it is possible for two clocks to drift relative to each other.

func CMSyncGetRelativeRate(CMClockOrTimebase, relativeTo: CMClockOrTimebase) -> Float64

Queries the relative rate of one timebase or clock relative to another timebase or clock.

func CMSyncGetRelativeRateAndAnchorTime(CMClockOrTimebase, relativeTo: CMClockOrTimebase, relativeRateOut: UnsafeMutablePointer<Float64>?, anchorTimeOut: UnsafeMutablePointer<CMTime>?, relativeToAnchorTimeOut: UnsafeMutablePointer<CMTime>?) -> OSStatus

Queries the relative rate of one timebase or clock relative to another timebase or clock and the times of each timebase or clock at which the relative rate went into effect.

func CMSyncConvertTime(CMTime, from: CMClockOrTimebase, to: CMClockOrTimebase) -> CMTime

Converts a time from one timebase or clock to another timebase or clock.

func CMSyncMightDrift(CMClockOrTimebase, CMClockOrTimebase) -> Bool

Returns a Boolean indicating whether it is possible for one timebase/clock to drift relative to the other.

func CMSyncGetTime(CMClockOrTimebase) -> CMTime

A helper function to get time from a clock or timebase.