Package com.bambuser.broadcaster
Class LatencyMeasurement
- java.lang.Object
-
- com.bambuser.broadcaster.LatencyMeasurement
-
public class LatencyMeasurement extends Object
A latency measurement consists of the measuredlatency
and theuncertainty
of the measurement. UseBroadcastPlayer.getEndToEndLatency()
to get a measurement. The measuredlatency
is at most +/-uncertainty
milliseconds from the actual latency.For example if the measured
latency
is 500 ms and theuncertainty
is 100 ms, the actual latency is between 400 and 600 ms.To avoid confusion, avoid showing the latency to end users if the uncertainty is relatively large. In extreme cases on unreliable mobile networks, the
uncertainty
may be very large. For example if theuncertainty
is 2000 ms and we know the actual latency is 1500 ms, thelatency
can in theory show as -500 to 3500 ms. In practice, the measured value is likely close to the actual latency.
-
-
Field Summary
Fields Modifier and Type Field Description int
latency
The measured latency, in milliseconds.int
uncertainty
The total clock synchronization uncertainty, in milliseconds.
-