public static class MonotonicClock.SampledClock extends java.lang.Object implements MonotonicClock
MonotonicClock.AbstractEpochSamplingClock, MonotonicClock.Defaults, MonotonicClock.SampledClock, MonotonicClock.SystemClockapproxTime, preciseTime| 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 MonotonicClockProvides 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 MonotonicClockpublic MonotonicClockTranslation translate()
translate in interface MonotonicClockpublic boolean isAfter(long instant)
isAfter in interface MonotonicClockpublic boolean isAfter(long now,
long instant)
isAfter in interface MonotonicClockpublic void pauseNowSampling()
public void resumeNowSampling()
public void refreshNow()
Copyright © 2009-2020 The Apache Software Foundation