Contents
Class TimeUtil
java.lang.Object
com.hypixel.hytale.common.util.TimeUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareDifference(Instant from, Instant to, Duration duration) Allocation free version of the following:
-
Constructor Details
-
TimeUtil
public TimeUtil()
-
-
Method Details
-
compareDifference
public static int compareDifference(@Nonnull Instant from, @Nonnull Instant to, @Nonnull Duration duration) Allocation free version of the following:
May allocate an exception if the time difference between the two instants don't fit into a single long (about 292 years).Duration.between(from, to).compareTo(duration)- Returns:
- a value larger than 0 if the difference between
fromandtois larger thanduration, a value less than 0 if the difference is smaller and 0 if they are equal.
-