Package org.apache.cassandra.utils
Class MonotonicClock.AbstractEpochSamplingClock.AlmostSameTime
- java.lang.Object
-
- org.apache.cassandra.utils.MonotonicClock.AbstractEpochSamplingClock.AlmostSameTime
-
- All Implemented Interfaces:
MonotonicClockTranslation
- Enclosing class:
- MonotonicClock.AbstractEpochSamplingClock
public static class MonotonicClock.AbstractEpochSamplingClock.AlmostSameTime extends java.lang.Object implements MonotonicClockTranslation
-
-
Constructor Summary
Constructors Constructor Description AlmostSameTime(long millisSinceEpoch, long monotonicNanos, long errorNanos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
error()
Nanoseconds of probable error in the translationlong
fromMillisSinceEpoch(long currentTimeMillis)
accepts millis since epoch, returns nanoTime in the related clocklong
toMillisSinceEpoch(long nanoTime)
accepts nanoTime in the related MonotinicClock, returns millis since epoch
-
-
-
Method Detail
-
fromMillisSinceEpoch
public long fromMillisSinceEpoch(long currentTimeMillis)
Description copied from interface:MonotonicClockTranslation
accepts millis since epoch, returns nanoTime in the related clock- Specified by:
fromMillisSinceEpoch
in interfaceMonotonicClockTranslation
-
toMillisSinceEpoch
public long toMillisSinceEpoch(long nanoTime)
Description copied from interface:MonotonicClockTranslation
accepts nanoTime in the related MonotinicClock, returns millis since epoch- Specified by:
toMillisSinceEpoch
in interfaceMonotonicClockTranslation
-
error
public long error()
Description copied from interface:MonotonicClockTranslation
Nanoseconds of probable error in the translation- Specified by:
error
in interfaceMonotonicClockTranslation
-
-