-
- All Implemented Interfaces:
-
com.datadog.trace.api.time.TimeSource
public class ControllableTimeSource implements TimeSource
-
-
Method Summary
Modifier and Type Method Description voidadvance(long nanosIncrement)voidset(long nanos)longgetNanoTicks()Returns monotonically increasing ticks from some arbitrary start point. longgetCurrentTimeMillis()Milliseconds since the start of the epoch longgetCurrentTimeMicros()Microseconds since the start of the epoch longgetCurrentTimeNanos()Nanoseconds since the start of the epoch. -
-
Method Detail
-
advance
void advance(long nanosIncrement)
-
set
void set(long nanos)
-
getNanoTicks
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
long getCurrentTimeMillis()
Milliseconds since the start of the epoch
-
getCurrentTimeMicros
long getCurrentTimeMicros()
Microseconds since the start of the epoch
-
getCurrentTimeNanos
long getCurrentTimeNanos()
Nanoseconds since the start of the epoch. Valid for the time range 1/1/1970 +/- 270 years
-
-
-
-