Class HumanReadableTimeUtils
- java.lang.Object
-
- org.antublue.test.engine.internal.util.HumanReadableTimeUtils
-
public final class HumanReadableTimeUtils extends Object
Class to create a human-readable time from a duration
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stringnow()Method to get the current time as a Stringstatic StringtoHumanReadable(long nanoseconds)Method to convert a duration into a human-readable timestatic StringtoHumanReadable(long nanoseconds, boolean useShortFormat)Method to convert a duration into a human-readable timestatic StringtoTimingUnit(long nanoseconds, String timingUnit)Method to convert nanoseconds to specific timing unit String
-
-
-
Method Detail
-
toHumanReadable
public static String toHumanReadable(long nanoseconds)
Method to convert a duration into a human-readable time- Parameters:
nanoseconds- nanoseconds- Returns:
- the return value
-
toHumanReadable
public static String toHumanReadable(long nanoseconds, boolean useShortFormat)
Method to convert a duration into a human-readable time- Parameters:
nanoseconds- nanosecondsuseShortFormat- useShortFormat- Returns:
- the return value
-
now
public static String now()
Method to get the current time as a String- Returns:
- the return value
-
-