Function

CMSyncConvertTime

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

Declaration

CMTime CMSyncConvertTime(CMTime time, CMClockOrTimebaseRef fromClockOrTimebase, CMClockOrTimebaseRef toClockOrTimebase);

Discussion

If both have a common master, this calculation is performed purely based on the mathematical rates and offsets in the common tree rooted in that master. If they have different master clocks (or are both clocks), this calculation also compensates for measured drift between the clocks. To convert to or from host time, pass CMClockGetHostTimeClock() as the appropriate argument.

See Also

Utility Functions

CMClockGetTypeID

Returns the CFTypeID of the CMClock.

CMClockMightDrift

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

CMClockInvalidate

Makes the clock stop functioning.

CMSyncGetRelativeRate

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

CMSyncGetRelativeRateAndAnchorTime

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.

CMSyncMightDrift

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

CMSyncGetTime

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