Class TimeUtils

java.lang.Object
gg.xp.reevent.time.TimeUtils

public final class TimeUtils extends Object
  • Method Details

    • now

      public static Instant now()
    • clampInstant

      public static Instant clampInstant(Instant input, Instant min, Instant max)
    • clampDuration

      public static Duration clampDuration(Duration input, Duration min, Duration max)
    • durationToDouble

      public static double durationToDouble(Duration input)
      Converts a duration to a double representing seconds and ms. e.g. 1200ms becomes 1.2. 1.33333.... becomes 1.333.
      Parameters:
      input - A duration
      Returns:
      A double representing seconds, with 3 digits of precision past the decimal.