List of usage examples for org.apache.commons.lang.time DurationFormatUtils formatDurationISO
public static String formatDurationISO(long durationMillis)
Formats the time gap as a string.
The format used is the ISO8601 period format.
This method formats durations using the days and lower fields of the ISO format pattern, such as P7D6TH5M4.321S.
From source file:org.eclipse.skalli.core.rest.JSONRestWriter.java
@Override public RestWriter duration(long millis) throws IOException { return value(DurationFormatUtils.formatDurationISO(millis)); }
From source file:org.eclipse.skalli.core.rest.JSONRestWriter.java
@Override public RestWriter duration(String key, long millis) throws IOException { return object(key).pair(MILLIS_KEY, millis).value(DurationFormatUtils.formatDurationISO(millis)); }