-
- All Implemented Interfaces:
-
com.datadog.trace.api.time.TimeSource
public class SystemTimeSource implements TimeSource
-
-
Field Summary
Fields Modifier and Type Field Description public final static TimeSourceINSTANCE
-
Method Summary
Modifier and Type Method Description 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
-
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
-
-
-
-