Interface Ticks


public interface Ticks
Standard game tick utilities.
Since:
4.0.0
  • Field Summary

    Fields
    Modifier and Type Field Description
    static long SINGLE_TICK_DURATION_MS
    A single tick duration, in milliseconds.
    static int TICKS_PER_SECOND
    The number of ticks that occur in one second.
  • Method Summary

    Static Methods
    Modifier and Type Method Description
    static @NonNull Duration duration​(long ticks)
    Converts ticks into a Duration.
  • Field Details

    • TICKS_PER_SECOND

      static final int TICKS_PER_SECOND
      The number of ticks that occur in one second.
      Since:
      4.0.0
      See Also:
      Constant Field Values
    • SINGLE_TICK_DURATION_MS

      static final long SINGLE_TICK_DURATION_MS
      A single tick duration, in milliseconds.
      Since:
      4.0.0
      See Also:
      Constant Field Values
  • Method Details

    • duration

      static @NonNull Duration duration​(long ticks)
      Converts ticks into a Duration.
      Parameters:
      ticks - the number of ticks
      Returns:
      a duration
      Since:
      4.0.0