Class Clock.ManualClock

java.lang.Object
io.unitycatalog.client.internal.Clock.ManualClock
All Implemented Interfaces:
Clock
Enclosing interface:
Clock

public static class Clock.ManualClock extends Object implements Clock
  • Method Details

    • now

      public Instant now()
      Specified by:
      now in interface Clock
      Returns:
      the current time of the clock.
    • sleep

      public void sleep(Duration duration)
      Description copied from interface: Clock
      Sleeps for the given duration.

      For system clock, this performs an actual sleep by calling Thread.sleep(long). For manual clock, this advances the clock time by the given duration without sleeping.

      Specified by:
      sleep in interface Clock
      Parameters:
      duration - the duration to sleep