Class Clock.Cached

java.lang.Object
io.deephaven.base.clock.Clock.Cached
All Implemented Interfaces:
Clock
Enclosing interface:
Clock

public static class Clock.Cached
extends Object
implements Clock
This implementation just returns the last value passed to set(). It allows for precise control over when clock calls are made to the underlying system (e.g. AppClock.currentTimeMicros()).
  • Constructor Details

    • Cached

      public Cached()
  • Method Details

    • set

      public void set​(long nowMicros)
    • currentTimeMillis

      public final long currentTimeMillis()
      Specified by:
      currentTimeMillis in interface Clock
    • currentTimeMicros

      public final long currentTimeMicros()
      Specified by:
      currentTimeMicros in interface Clock