public final class PingTime
extends java.lang.Object
getReceived() and getSent() are
nano precision as per: System.nanoTime() and comparable to each other. You cannot compare
these values to the 'atServer' timestamp as that is wall-clock time.
getReceivedMsAsNs() returns the millisecond wall-clock timestamp the Ping was received at the client.
This is comparable to the server's timestamp.
NO_VALUE| Modifier and Type | Field and Description |
|---|---|
static long |
NO_VALUE |
| Modifier and Type | Method and Description |
|---|---|
void |
copyValuesFrom(PingTime other) |
long |
getAtServer()
Returns the epoch nano timestamp the ping was received at the server
This timestamp is not comparable to the Sent or Received timestamps.
|
long |
getReceived()
Returns the nano timestamp the ping was received back at the client.
|
long |
getReceivedMsAsNs()
Returns the epoch milliseconds the ping was received back at the client.
|
long |
getSent()
Returns the nano timestamp the ping was sent from this client to the server.
|
void |
set(long sent,
long atServer,
long received,
long receivedAtClientEpochNs) |
java.lang.String |
toString() |
public void set(long sent,
long atServer,
long received,
long receivedAtClientEpochNs)
public void copyValuesFrom(PingTime other)
public long getSent()
getReceived()public long getAtServer()
public long getReceived()
getSent()public long getReceivedMsAsNs()
getAtServer() timestamp.public java.lang.String toString()
toString in class java.lang.Object