Clock.addObservation

bool addObservation(gst.types.ClockTime slave, gst.types.ClockTime master, out double rSquared)

The time master of the master clock and the time slave of the slave clock are added to the list of observations. If enough observations are available, a linear regression algorithm is run on the observations and clock is recalibrated.

If this functions returns true, r_squared will contain the correlation coefficient of the interpolation. A value of 1.0 means a perfect regression was performed. This value can be used to control the sampling frequency of the master and slave clocks.

Parameters

slavea time on the slave
mastera time on the master
rSquareda pointer to hold the result

Returns

true if enough observations were added to run the

regression algorithm.