public final class JkUtilsTime
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static long |
durationInMillis(long startNano)
Returns the duration in millisecond between the specified nano time and
now.
|
static float |
durationInSeconds(long startNano)
Returns the duration in second between the specified nano time and now.
|
static java.lang.String |
formatMillis(long durationInMillis)
Formats the given duration in milliseconds into a human-readable string.
|
static java.util.Date |
now()
Returns the current ofSystem date
|
static java.lang.String |
now(java.lang.String pattern)
Returns the current ofSystem date as string with the specified format
|
static java.lang.String |
nowUtc(java.lang.String pattern)
Returns the current ofSystem date as string with the specified format
|
public static java.util.Date now()
public static java.lang.String now(java.lang.String pattern)
public static java.lang.String nowUtc(java.lang.String pattern)
public static float durationInSeconds(long startNano)
public static long durationInMillis(long startNano)
public static java.lang.String formatMillis(long durationInMillis)
durationInMillis
- The duration in milliseconds.