public class SntpClient
extends java.lang.Object
Constructor and Description |
---|
SntpClient() |
Modifier and Type | Method and Description |
---|---|
long |
getNtpTime()
Returns the time computed from the NTP transaction.
|
long |
getNtpTimeReference()
Returns the reference clock value (value of SystemClock.elapsedRealtime()) * corresponding to the NTP time.
|
long |
getRoundTripTime()
Returns the round trip time of the NTP transaction * * @return round trip time in milliseconds.
|
boolean |
requestTime(java.lang.String host,
int timeout)
Sends an SNTP request to the given host and processes the response.
|
public boolean requestTime(java.lang.String host, int timeout)
public long getNtpTime()
public long getNtpTimeReference()
public long getRoundTripTime()