Java Code Examples for org.apache.commons.lang3.time.DurationFormatUtils#formatDurationWords()
The following examples show how to use
org.apache.commons.lang3.time.DurationFormatUtils#formatDurationWords() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EpochController.java From dev-tools with Apache License 2.0 | 5 votes |
@FXML private void handleMillisToTime(final ActionEvent actionEvent) { tsToHumanField.setBorder(Border.EMPTY); try { long millis = Long.parseLong(tsToHumanField.getText()); String result = DurationFormatUtils.formatDurationWords(millis, true, true); tsToHumanResult.setText(result); } catch (Exception e) { tsToHumanField.setBorder(Elements.alertBorder); tsToHumanResult.setText(""); } }
Example 2
Source File: DescriptiveWait.java From vividus with Apache License 2.0 | 4 votes |
@Override public String toString() { return "Wait with timeout of " + DurationFormatUtils.formatDurationWords(timeout.toMillis(), true, true) + ". Condition: " + isTrue; }
Example 3
Source File: DateUtils.java From onedev with MIT License | 4 votes |
public static String formatDuration(long durationMillis) { return DurationFormatUtils.formatDurationWords(durationMillis, true, true); }
Example 4
Source File: ProxyLiveUtils.java From proxylive with MIT License | 4 votes |
public static String convertMilisToTime(long time) { return DurationFormatUtils.formatDurationWords(time, true, true); }
Example 5
Source File: ProfileWrapper.java From dremio-oss with Apache License 2.0 | 4 votes |
public String getPerdiodFromStart(Long datetime) { if (datetime == null) { return ""; } return DurationFormatUtils.formatDurationWords( this.profile.getStart() - datetime, true, true); }