Package io.opencensus.internal
Class ZeroTimeClock
- java.lang.Object
-
- io.opencensus.common.Clock
-
- io.opencensus.internal.ZeroTimeClock
-
-
Field Summary
Fields Modifier and Type Field Description private static ZeroTimeClockINSTANCEprivate static TimestampZERO_TIMESTAMP
-
Constructor Summary
Constructors Modifier Constructor Description privateZeroTimeClock()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ZeroTimeClockgetInstance()Returns aZeroTimeClock.Timestampnow()Obtains the current instant from this clock.longnowNanos()Returns a time measurement with nanosecond precision that can only be used to calculate elapsed time.
-
-
-
Field Detail
-
INSTANCE
private static final ZeroTimeClock INSTANCE
-
ZERO_TIMESTAMP
private static final Timestamp ZERO_TIMESTAMP
-
-
Method Detail
-
getInstance
public static ZeroTimeClock getInstance()
Returns aZeroTimeClock.- Returns:
- a
ZeroTimeClock.
-
now
public Timestamp now()
Description copied from class:ClockObtains the current instant from this clock.
-
nowNanos
public long nowNanos()
Description copied from class:ClockReturns a time measurement with nanosecond precision that can only be used to calculate elapsed time.
-
-