Class TimeUtil

java.lang.Object
ca.spottedleaf.concurrentutil.util.TimeUtil

public final class TimeUtil extends Object
  • Method Details

    • compareTimes

      public static int compareTimes(long t1, long t2)
      This function is appropriate to be used as a Comparator between two timestamps, which indicates whether the timestamps represented by t1, t2 that t1 is before, equal to, or after t2.
    • getGreatestTime

      public static long getGreatestTime(long t1, long t2)
    • getLeastTime

      public static long getLeastTime(long t1, long t2)
    • clampTime

      public static long clampTime(long value, long min, long max)