public interface DurationUtil
Modifier and Type | Method and Description |
---|---|
String |
formatMilliseconds(long millis)
This method formats the given milliseconds as a human readable
String . |
String |
formatNanoseconds(long nanos)
This method formats the given nanoseconds as a human readable
String . |
String |
formatSeconds(long seconds)
This method formats the given seconds as a human readable
String . |
String formatNanoseconds(long nanos)
String
.
nanos | formatNanoseconds(nanos) |
---|---|
1 | "0.000000001" |
61000000000 | "1:01" |
7141123456789" | "1:59:01.123456789" |
1234567890123456" | "14D06:47:07.890123456" |
nanos
- is a duration in nanoseconds.String formatMilliseconds(long millis)
String
.
millis | formatMilliseconds(millis) |
---|---|
1 | "0.001" |
61000 | "1:01" |
7141123" | "1:59:01.123" |
1234567890" | "14D06:47:07.890" |
millis
- is a duration in milliseconds.String formatSeconds(long seconds)
String
.
seconds | formatSeconds(seconds) |
---|---|
1 | "1" |
61 | "1:01" |
7141" | "1:59:01" |
1234567" | "14D06:56:07" |
seconds
- is a duration in seconds.Copyright © 2001–2016 mmm-Team. All rights reserved.