public abstract class TimeUtils extends Object
| Constructor and Description |
|---|
TimeUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatInterval(long i)
Format a time interval in milliseconds into a human readable form.
|
static String |
formatInterval(long i,
TimeUnit timeUnit)
Format a time interval into a human readable form.
|
static String |
perSecond(double divisor)
Calculates how many operations where done per second.
|
static String |
perSecond(long time,
long count)
Calculates how many operations where done per second.
|
public static String formatInterval(long i)
i - Time in millisecondspublic static String formatInterval(long i, TimeUnit timeUnit)
i - TimetimeUnit - TimeUnit to use for the calculationpublic static String perSecond(long time, long count)
time - Time in millisecondscount - Operation countpublic static String perSecond(double divisor)
divisor - Time divided by operation countCopyright © 2018. All rights reserved.