FileDocCategorySizeDatePackage
TrustedTime.javaAPI DocAndroid 5.1 API1695Thu Mar 12 22:22:10 GMT 2015android.util

TrustedTime

public interface TrustedTime
Interface that provides trusted time information, possibly coming from an NTP server. Implementations may cache answers until {@link #forceRefresh()}.
hide

Fields Summary
Constructors Summary
Methods Summary
public longcurrentTimeMillis()
Return current time similar to {@link System#currentTimeMillis()}, possibly using a cached authoritative time source.

public booleanforceRefresh()
Force update with an external trusted time source, returning {@code true} when successful.

public longgetCacheAge()
Return time since last trusted time source contact, or {@link Long#MAX_VALUE} if never contacted.

public longgetCacheCertainty()
Return certainty of cached trusted time in milliseconds, or {@link Long#MAX_VALUE} if never contacted. Smaller values are more precise.

public booleanhasCache()
Check if this instance has cached a response from a trusted time source.