CMSyncGetRelativeRate(_:relativeTo:)
Returns the relative rate of one timebase or clock relative to another timebase or clock.
Declaration
func CMSyncGetRelativeRate(_ ofClockOrTimebase: CMClockOrTimebase, relativeTo relativeToClockOrTimebase: CMClockOrTimebase) -> Float64Discussion
If both have a common host, the function syncs the clock or timebase based on the rates in the common tree rooted in that host.
If they have different host clocks (or are both clocks), this calculation takes into account the measured drift between the two clocks, using host time as a pivot. The rate of a moving timebase relative to a stopped timebase is a NaN. Calling CMTimebaseGetEffectiveRate(timebase) is equivalent to calling CMSyncGetRelativeRate(timebase, CMTimebaseGetUltimateMasterClock(timebase)).