public interface Clock
Modifier and Type | Method and Description |
---|---|
long |
currentNanoTicks()
Returns the current value of the running Java Virtual Machine's high-resolution time source, in
nanoseconds.
|
long |
currentTimeMicros()
Returns the current time in microseconds.
|
boolean |
isMicrosAccurate() |
long currentTimeMicros()
long currentNanoTicks()
This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time.
boolean isMicrosAccurate()
currentTimeMicros()
is accurate enough to
calculate span duration as (end-start). If this method returns false, the JaegerTracer
will
use currentNanoTicks()
for calculating duration instead.