public static class MonotonicClock.SampledClock extends java.lang.Object implements MonotonicClock
MonotonicClock.AbstractEpochSamplingClock, MonotonicClock.Global, MonotonicClock.SampledClock, MonotonicClock.SystemClock
Constructor and Description |
---|
SampledClock(MonotonicClock precise) |
Modifier and Type | Method and Description |
---|---|
long |
error() |
boolean |
isAfter(long instant) |
boolean |
isAfter(long now,
long instant) |
long |
now() |
void |
pauseNowSampling() |
void |
refreshNow() |
void |
resumeNowSampling() |
MonotonicClockTranslation |
translate() |
public SampledClock(MonotonicClock precise)
public long now()
now
in interface MonotonicClock
Provides a monotonic time that can be compared with any other such value produced by the same clock
since the application started only; these times cannot be persisted or serialized to other nodes.
Nanosecond precision.
public long error()
error
in interface MonotonicClock
public MonotonicClockTranslation translate()
translate
in interface MonotonicClock
public boolean isAfter(long instant)
isAfter
in interface MonotonicClock
public boolean isAfter(long now, long instant)
isAfter
in interface MonotonicClock
public void pauseNowSampling()
public void resumeNowSampling()
public void refreshNow()
Copyright © 2009- The Apache Software Foundation