List of utility methods to do Millisecond Convert
String | millisToHMSShort(long millis) millis To HMS Short boolean minus = false; if (millis < 0) { minus = true; millis = -millis; String hms = millisToHMS(millis); int i; for (i = 0; i < hms.length() - 1; i++) { ... |
String | millisToLongDHMS(long duration) converts time (in milliseconds) to human-readable format " return millisToLongDHMS(duration, true);
|
String | millisToLongDHMS(long duration) millis To Long DHMS StringBuffer res = new StringBuffer(); long temp = 0; if (duration >= ONE_SECOND) { temp = duration / ONE_DAY; if (temp > 0) { duration -= temp * ONE_DAY; res.append(temp).append(" day").append(temp > 1 ? "s" : "") .append(duration >= ONE_MINUTE ? ", " : ""); ... |
String | millisToLongDHMS(long duration, String pubDate) millis To Long DHMS StringBuffer res = new StringBuffer(); long temp = 0; if (duration >= ONE_SECOND) { temp = duration / ONE_DAY; if (temp > 0) { duration -= temp * ONE_DAY; res.append(pubDate); return res.toString(); ... |
String | millisToLongM(long duration) millis To Long M StringBuffer res = new StringBuffer(); long temp = 0; if (duration >= ONE_SECOND) { temp = duration / ONE_MINUTE; duration -= temp * ONE_MINUTE; res.append(temp).append(" minute").append(temp > 1 ? "s" : ""); return res.toString(); } else { ... |
long | millisToNanos(final long millis) Converts the provided number of milliseconds to nanoseconds. return Math.max(0L, (millis * 1_000_000L));
|
long | millisToNanos(int i) millis To Nanos return i * nanosInMillisecond;
|
long | millisToNanos(long millis) Convert milliseconds time to nanoseconds return millis * nanosPerMilli;
|
long | millisToNanos(long millis) millis To Nanos return millis * 1000000L;
|
long | millisToSecond(long millisecond) millis To Second return millisecond / MILLISECOND_IN_SECOND;
|