TimeSyncInfo

data class TimeSyncInfo(val supported: Boolean, val pings: Long, val minRttMs: Double, val uplinkEnvelopeMs: Double, val sampleRateHz: Double, val valid: Boolean)

How DeviceSession.sampleIndexAt places host times on the device's sample counter, and how well the device's clock fits the host's. For diagnostics; nothing else depends on it.

While a stream runs on a device that has the time-sync characteristic (firmware 3.8.0+) the session pings it a few times a second; each reply carries the device's clock and the sample it numbered last. From them the session fits the device's clock against the host's and the sample counter against the device's clock, and DeviceSession.sampleIndexAt places a host time with that fit instead of extrapolating from the newest packet, which lands early — on a sample from before the call — by that packet's trip over the radio, and jitters with it.

The figures describe the current connection and its running or last stream, and are zero/false before there are any.

Constructors

Link copied to clipboard
constructor(supported: Boolean, pings: Long, minRttMs: Double, uplinkEnvelopeMs: Double, sampleRateHz: Double, valid: Boolean)

Properties

Link copied to clipboard

shortest ping round trip of the last two minutes, in ms; 0 without pings.

Link copied to clipboard
val pings: Long

replies taken into the clock fit on this connection.

Link copied to clipboard

the device's sample rate as the fit measures it, per second of the device's own clock: the nominal rate until a second of samples is in; 0 with no fit.

Link copied to clipboard

the device answered the time-sync probe at the start of the running stream, or of the last one; false for firmware before 3.8.0, or before the first stream.

Link copied to clipboard

how far above the clock fit's lower envelope the median ping of the last two minutes arrives at the device, in ms: the wait for a connection event, and stack jitter, that the fit takes out of the placement; 0 without pings.

Link copied to clipboard

DeviceSession.sampleIndexAt places host times with the fit right now; false when it falls back to the packet timing (no stream, impedance mode, older firmware, or too few or too old pings).