|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.minetti.astrodevice.common.object.TimeSynchronization
public final class TimeSynchronization
Object containing all informations used for time synchronization. This is inspired of NTP protocol.
Constructor Summary | |
---|---|
TimeSynchronization(long originateTime,
long receiveTime,
long transmitTime)
Constructor. |
Method Summary | |
---|---|
long |
computeRoundtripDelay(long clientReceiveTime)
Computes and returns the round-trip delay time. |
long |
computeTimeOffset(long clientReceiveTime)
Computes and returns the time offset between the client and the server. |
long |
getOriginateTime()
Returns the start time of the request by the client (equivalent to the OT field of the NTP protocol). |
long |
getReceiveTime()
Returns the receipt time of the request on the server (equivalent to the RT field of the NTP protocol). |
long |
getTransmitTime()
Returns the transmission time of the response by the server (equivalent to the TT field of the NTP protocol). |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TimeSynchronization(long originateTime, long receiveTime, long transmitTime)
originateTime
- Start time of the response (given by the client - clientTransmitTime).receiveTime
- Receipt time of the request.transmitTime
- Transmission time of the response.Method Detail |
---|
public long getOriginateTime()
public long getReceiveTime()
public long getTransmitTime()
public long computeTimeOffset(long clientReceiveTime)
clientReceiveTime
- Receipt time of the response on the client.
public long computeRoundtripDelay(long clientReceiveTime)
clientReceiveTime
- Receipt time of the response on the client.
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |