public interface TrustedTime
forceRefresh()
.Modifier and Type | Method and Description |
---|---|
long |
currentTimeMillis()
Return current time similar to
System.currentTimeMillis() ,
possibly using a cached authoritative time source. |
boolean |
forceRefresh()
Force update with an external trusted time source, returning
true
when successful. |
long |
getCacheAge()
Return time since last trusted time source contact, or
Long.MAX_VALUE if never contacted. |
long |
getCacheCertainty()
Return certainty of cached trusted time in milliseconds, or
Long.MAX_VALUE if never contacted. |
boolean |
hasCache()
Check if this instance has cached a response from a trusted time source.
|
boolean forceRefresh()
true
when successful.boolean hasCache()
long getCacheAge()
Long.MAX_VALUE
if never contacted.long getCacheCertainty()
Long.MAX_VALUE
if never contacted. Smaller values are more
precise.long currentTimeMillis()
System.currentTimeMillis()
,
possibly using a cached authoritative time source.