@@ -0,0 +1,1185 @@
+/**%0D%0A * %0D%0A */%0D%0Apackage com.valencia.jutils.time;%0D%0A%0D%0Aimport java.time.temporal.ChronoUnit;%0D%0Aimport java.util.concurrent.TimeUnit;%0D%0A%0D%0A/**%0D%0A * Time-related utilities.%0D%0A * %0D%0A * @author Gabriel Valencia, gee4vee@me.com%0D%0A */%0D%0Apublic class TimeUtils %7B%0D%0A%0D%0A    /**%0D%0A     * Converts the specified unit to a matching %3Ccode%3ETimeUnit%3C/code%3E if possible. Only those supported by %3Ccode%3ETimeUnit%3C/code%3E can be %0D%0A     * converted. All others will return %3Ccode%3Enull%3C/code%3E.%0D%0A     * %0D%0A     * @param tu The unit to convert.%0D%0A     */%0D%0A    public static TimeUnit toTimeUnit(ChronoUnit tu) %7B%0D%0A        switch (tu) %7B%0D%0A        case DAYS:%0D%0A            return TimeUnit.DAYS;%0D%0A            %0D%0A        case HOURS:%0D%0A            return TimeUnit.HOURS;%0D%0A            %0D%0A        case MICROS:%0D%0A            return TimeUnit.MICROSECONDS;%0D%0A            %0D%0A        case MILLIS:%0D%0A            return TimeUnit.MILLISECONDS;%0D%0A            %0D%0A        case MINUTES:%0D%0A            return TimeUnit.MINUTES;%0D%0A            %0D%0A        case NANOS:%0D%0A            return TimeUnit.NANOSECONDS;%0D%0A            %0D%0A        case SECONDS:%0D%0A            return TimeUnit.SECONDS;%0D%0A            %0D%0A        default:%0D%0A            return null;%0D%0A        %7D%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Convert ChronoUnit to TimeUnit.