Class TimeUtil
java.lang.Object
ca.spottedleaf.concurrentutil.util.TimeUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic longclampTime(long value, long min, long max) static intcompareTimes(long t1, long t2) This function is appropriate to be used as aComparatorbetween two timestamps, which indicates whether the timestamps represented by t1, t2 that t1 is before, equal to, or after t2.static longgetGreatestTime(long t1, long t2) static longgetLeastTime(long t1, long t2)
-
Method Details
-
compareTimes
public static int compareTimes(long t1, long t2) This function is appropriate to be used as aComparatorbetween 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)
-