ComputedInstant

class ComputedInstant


A locally computed Unix epoch time derived from an external time signal. Includes metadata that can be used to understand the probable accuracy, and the Ticks used to calculate it.

Summary

Public functions

Boolean
equals(o: Any?)
Duration?
@RequiresApi(api = VERSION_CODES.O)
getEstimatedError()

Returns an absolute value for accuracy estimate as a Duration, or null if the error cannot be computed.

Long?

Returns an absolute value for accuracy estimate in milliseconds, or null if the error cannot be computed.

Instant!
@RequiresApi(api = VERSION_CODES.O)
getInstant()

Returns the computed Unix epoch time as an Instant.

Long

Returns the computed Unix epoch time as a value in milliseconds.

Int
String!

Public functions

equals

fun equals(o: Any?): Boolean

getEstimatedError

@RequiresApi(api = VERSION_CODES.O)
fun getEstimatedError(): Duration?

Returns an absolute value for accuracy estimate as a Duration, or null if the error cannot be computed.

When present, this value can be added and subtracted from an instant to arrive at probable bounds for the computed instant.

This value can be null if the behavior of the local device clock used to track ticks is not yet known, or has been detected to be unpredictable.

getEstimatedErrorMillis

fun getEstimatedErrorMillis(): Long?

Returns an absolute value for accuracy estimate in milliseconds, or null if the error cannot be computed.

When present, this value can be added and subtracted from an instant to arrive at probable bounds for the computed instant.

This value can be null if the behavior of the local device clock used to track ticks is not yet known, or has been detected to be unpredictable.

getInstant

@RequiresApi(api = VERSION_CODES.O)
fun getInstant(): Instant!

Returns the computed Unix epoch time as an Instant.

getInstantMillis

fun getInstantMillis(): Long

Returns the computed Unix epoch time as a value in milliseconds.

hashCode

fun hashCode(): Int

toString

fun toString(): String!

Public properties

originalTimeSignal

val originalTimeSignalTimeSignal!

ticks

val ticksTicks!