public class TimingUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static DateTimeFormatter |
logDateFormat
Formats dates for logging
|
| Constructor and Description |
|---|
TimingUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
elapsedTime(long start,
long end)
Calculate the elapsed time between two times specified in milliseconds.
|
static String |
logDateMillis(long millis)
Convert epoch milliseconds (
System.currentTimeMillis()) into date
string (local time zone) used for logging |
static String |
secondsToDaysHMS(long seconds)
Show time in seconds as days, hours, minutes and seconds (d days, hh:mm:ss)
|
static String |
secondsToHMS(long seconds)
Show time in seconds as hours, minutes and seconds (hh:mm:ss)
|
public static DateTimeFormatter logDateFormat
public static String logDateMillis(long millis)
System.currentTimeMillis()) into date
string (local time zone) used for loggingpublic static String elapsedTime(long start, long end)
start - The start of the time periodend - The end of the time periodpublic static String secondsToHMS(long seconds)
seconds - (elapsed) time in secondspublic static String secondsToDaysHMS(long seconds)
seconds - (elapsed) time in secondsCopyright © 2021 The Apache Software Foundation