Class ClockHolder

java.lang.Object
io.github.mfvanek.pg.utils.ClockHolder

public final class ClockHolder extends Object
Utility class to work with Clock.
Since:
0.6.0
  • Method Details

    • clock

      @Nonnull public static Clock clock()
      Allows to get currently set Clock instance.
      Returns:
      Clock instance
    • setClock

      @Nonnull public static Clock setClock(@Nonnull Clock newClock)
      Atomically sets the CLOCK_REFERENCE to newClock and returns the old value.
      Parameters:
      newClock - the new value
      Returns:
      the previous value of clock