public class RTT extends Object
| Constructor and Description |
|---|
RTT() |
RTT(long rtt,
boolean isUDP)
Create RTT object with some given RTT, and a flag
if the time was measured on a UDP exchange.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
beginTimeMeasurement(boolean isUDP)
Begin counting the time.
|
long |
getRtt()
Get round-trip-time in milliseconds.
|
long |
getStartMeasurementTimestamp() |
boolean |
isEstimated()
Returns if the RTT measured is an estimate for some other peer
|
boolean |
isUDP() |
RTT |
setEstimated()
Marks this RTT object as an estimate
|
boolean |
stopTimeMeasurement()
Stop the time measurement and calculate the rtt
BeginTimeMeasurement must have been called before
Can only be called once
|
String |
toString() |
public RTT()
public RTT(long rtt, boolean isUDP)
rtt - The rtt to be set in millisecondsisUDP - True if this was an UDP exchange, set false
if it was a TCP exchange.public boolean beginTimeMeasurement(boolean isUDP)
public boolean stopTimeMeasurement()
public long getStartMeasurementTimestamp()
public long getRtt()
public boolean isUDP()
public boolean isEstimated()
public RTT setEstimated()
Copyright © 2015. All rights reserved.