| Modifier and Type | Method and Description |
|---|---|
static boolean |
isPositive(Duration dur) |
static String |
printDuration(Duration uptime) |
static String |
printDuration(long uptime)
Prints the duration in a human readable format as X days Y hours Z minutes etc.
|
static String |
printDuration(long uptime,
boolean precise)
Prints the duration in a human readable format as X days Y hours Z minutes etc.
|
static Duration |
toDuration(String source) |
static long |
toMilliSeconds(String source) |
public static boolean isPositive(Duration dur)
public static String printDuration(Duration uptime)
public static String printDuration(long uptime)
uptime - the uptime in millispublic static String printDuration(long uptime, boolean precise)
uptime - the uptime in millisprecise - whether to be precise and include all details including milli secondspublic static Duration toDuration(String source) throws IllegalArgumentException
IllegalArgumentExceptionpublic static long toMilliSeconds(String source) throws IllegalArgumentException
IllegalArgumentExceptionApache Camel