ThreadNetworkCredentials.Timestamp

public static final class ThreadNetworkCredentials.Timestamp extends Object

The timestamp of Thread Operational Dataset.

Public Constructor Summary

Timestamp(long seconds, int ticks, boolean isAuthoritativeSource)
Creates a new ThreadNetworkCredentials.Timestamp object with given parameters.

Public Method Summary

boolean
equals(Object other)
long
getSeconds()
Returns the seconds portion of the timestamp.
int
getTicks()
Returns the ticks portion of the timestamp.
int
boolean
isAuthoritativeSource()
Indicates whether the timestamp comes from an authoritative source.
String

Inherited Method Summary

Public Constructors

public Timestamp (long seconds, int ticks, boolean isAuthoritativeSource)

Creates a new ThreadNetworkCredentials.Timestamp object with given parameters.

Parameters
seconds the value encodes a Unix Time value. Must be in the range of 0x0-0xffffffffffffL.
ticks the value encodes the fractional Unix Time value in 32.768 kHz resolution. Must be in the range of 0x0-0x7fff.
isAuthoritativeSource the flag indicates the time was obtained from an authoritative source: either NTP (Network Time Protocol), GPS (Global Positioning System), cell network, or other method.
Throws
IllegalArgumentException if the seconds is not in range of 0x0-0xffffffffffffL or ticks is not in range of 0x0-0x7fff.

Public Methods

public boolean equals (Object other)

public long getSeconds ()

Returns the seconds portion of the timestamp.

public int getTicks ()

Returns the ticks portion of the timestamp.

public int hashCode ()

public boolean isAuthoritativeSource ()

Indicates whether the timestamp comes from an authoritative source.

public String toString ()