-
public interface TimeSourceInterface to retrieve various time primitives. Limited by the granularity of the underlying platform.
-
-
Method Summary
Modifier and Type Method Description abstract longgetNanoTicks()Returns monotonically increasing ticks from some arbitrary start point. abstract longgetCurrentTimeMillis()Milliseconds since the start of the epoch abstract longgetCurrentTimeMicros()Microseconds since the start of the epoch abstract longgetCurrentTimeNanos()Nanoseconds since the start of the epoch. -
-
Method Detail
-
getNanoTicks
abstract long getNanoTicks()
Returns monotonically increasing ticks from some arbitrary start point. Should only be used tomeasure durations. Negative numbers and zero are both valid return values
-
getCurrentTimeMillis
abstract long getCurrentTimeMillis()
Milliseconds since the start of the epoch
-
getCurrentTimeMicros
abstract long getCurrentTimeMicros()
Microseconds since the start of the epoch
-
getCurrentTimeNanos
abstract long getCurrentTimeNanos()
Nanoseconds since the start of the epoch. Valid for the time range 1/1/1970 +/- 270 years
-
-
-
-