Class TimeProvider.Untimed

java.lang.Object
net.royalur.rules.TimeProvider.Untimed
All Implemented Interfaces:
TimeProvider
Enclosing interface:
TimeProvider

public static class TimeProvider.Untimed extends Object implements TimeProvider
  • Constructor Details

    • Untimed

      public Untimed()
  • Method Details

    • isTimed

      public boolean isTimed()
      Description copied from interface: TimeProvider
      Checks whether this time provider produces values other than zero.
      Specified by:
      isTimed in interface TimeProvider
      Returns:
      Whether this time provider produces values other than zero.
    • getGameStartEpochMs

      public long getGameStartEpochMs()
      Description copied from interface: TimeProvider
      Gets the start time of the game in milliseconds since the epoch. If this provider is untimed, 0 will be returned instead.
      Specified by:
      getGameStartEpochMs in interface TimeProvider
      Returns:
      The start time of the game in milliseconds since the epoch.
    • getTimeSinceGameStartMs

      public long getTimeSinceGameStartMs()
      Description copied from interface: TimeProvider
      Gets the number of milliseconds elapsed since the start of the game.
      Specified by:
      getTimeSinceGameStartMs in interface TimeProvider
      Returns:
      The number of milliseconds elapsed since the start of the game.