Package alluxio.clock
Class ElapsedTimeClock
- java.lang.Object
-
- java.time.Clock
-
- alluxio.clock.ElapsedTimeClock
-
public final class ElapsedTimeClock extends java.time.Clock
A monotonically increasing clock for calculating elapsed time. NOTE: this is not related to system time so the value returned cannot be used for representing date time. The time can be different across JVM. Do not use it for across processes/machines calculation.
-
-
Constructor Summary
Constructors Constructor Description ElapsedTimeClock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.ZoneId
getZone()
java.time.Instant
instant()
long
millis()
java.time.Clock
withZone(java.time.ZoneId zone)
-
-
-
Method Detail
-
millis
public long millis()
- Overrides:
millis
in classjava.time.Clock
-
getZone
public java.time.ZoneId getZone()
- Specified by:
getZone
in classjava.time.Clock
-
withZone
public java.time.Clock withZone(java.time.ZoneId zone)
- Specified by:
withZone
in classjava.time.Clock
-
instant
public java.time.Instant instant()
- Specified by:
instant
in classjava.time.Clock
-
-