public class TimeUtils
extends java.lang.Object
TimeUnit.convert(long, TimeUnit)
that accepts and preserves
precision from a double
argument.Constructor and Description |
---|
TimeUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
convert(double t,
java.util.concurrent.TimeUnit sourceUnit,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
daysToUnit(double days,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
hoursToUnit(double hours,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
microsToUnit(double micros,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
millisToUnit(double millis,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
minutesToUnit(double minutes,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
nanosToUnit(double nanos,
java.util.concurrent.TimeUnit destinationUnit) |
static double |
secondsToUnit(double seconds,
java.util.concurrent.TimeUnit destinationUnit) |
public static double convert(double t, java.util.concurrent.TimeUnit sourceUnit, java.util.concurrent.TimeUnit destinationUnit)
public static double nanosToUnit(double nanos, java.util.concurrent.TimeUnit destinationUnit)
public static double microsToUnit(double micros, java.util.concurrent.TimeUnit destinationUnit)
public static double millisToUnit(double millis, java.util.concurrent.TimeUnit destinationUnit)
public static double secondsToUnit(double seconds, java.util.concurrent.TimeUnit destinationUnit)
public static double minutesToUnit(double minutes, java.util.concurrent.TimeUnit destinationUnit)
public static double hoursToUnit(double hours, java.util.concurrent.TimeUnit destinationUnit)
public static double daysToUnit(double days, java.util.concurrent.TimeUnit destinationUnit)