[−][src]Function lsl_sys::lsl_time_correction
pub unsafe extern "C" fn lsl_time_correction(
in_: lsl_inlet,
timeout: f64,
ec: *mut i32
) -> f64
@brief Retrieve an estimated time correction offset for the given stream.
The first call to this function takes several milliseconds until a reliable first estimate is obtained. Subsequent calls are instantaneous (and rely on periodic background updates).
On a well-behaved network, the precision of these estimates should be below 1 ms (empirically it is within +/-0.2 ms).
To get a measure of whether the network is well-behaved, use #lsl_time_correction_ex and check uncertainty (which maps to round-trip-time). 0.2 ms is typical of wired networks.
2 ms is typical of wireless networks. The number can be much higher on poor networks.
@param in The lsl_inlet object to act on. @param timeout Timeout to acquire the first time-correction estimate. Use LSL_FOREVER to defuse the timeout. @param[out] ec Error code: if nonzero, can be either #lsl_timeout_error (if the timeout has expired) or lsl_lost_error (if the stream source has been lost). @return The time correction estimate. This is the number that needs to be added to a time stamp that was remotely generated via lsl_local_clock() to map it into the local clock domain of this machine.