Package io.deephaven.base.clock
Class ClockNanoBase
java.lang.Object
io.deephaven.base.clock.ClockNanoBase
- All Implemented Interfaces:
Clock
A base implementation of Clock, with all methods being sourced from
Clock.currentTimeNanos().-
Constructor Details
-
ClockNanoBase
public ClockNanoBase()
-
-
Method Details
-
currentTimeMillis
public final long currentTimeMillis()Description copied from interface:ClockMilliseconds since the epoch, 1970-01-01T00:00:00Z.The resolution is dependent on the JVM and underlying implementation.
- Specified by:
currentTimeMillisin interfaceClock- Returns:
- epoch millis
-
currentTimeMicros
public final long currentTimeMicros()Description copied from interface:ClockMicroseconds since the epoch, 1970-01-01T00:00:00Z.The resolution is dependent on the JVM and underlying implementation. The resolution is greater than or equal to
Clock.currentTimeMillis().- Specified by:
currentTimeMicrosin interfaceClock- Returns:
- epoch microseconds
-
instantNanos
Description copied from interface:ClockThe instant.Has resolution equal to
Clock.currentTimeNanos().If you don't need the resolution provided by
Clock.currentTimeNanos(), preferClock.instantMillis().- Specified by:
instantNanosin interfaceClock- Returns:
- the instant
-
instantMillis
Description copied from interface:ClockThe instant.Has resolution greater than or equal to
Clock.currentTimeMillis().- Specified by:
instantMillisin interfaceClock- Returns:
- the instant.
-