Skip to content

Commit

Permalink
Include seconds below 10 min
Browse files Browse the repository at this point in the history
  • Loading branch information
NotRyken committed Jun 18, 2024
1 parent 91745e9 commit 21a21c0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ public static String getDurationAsString(int durationTicks) {
else if (seconds >= 3600) {
return seconds / 3600 + "h";
}
else if (seconds >= 60) {
else if (seconds >= 600) {
return seconds / 60 + "m";
}
else if (seconds >= 60) {
int sec = seconds % 60;
return seconds / 60 + ":" + (sec > 9 ? sec : "0" + sec);
}
else {
return String.valueOf(seconds);
}
Expand Down

0 comments on commit 21a21c0

Please sign in to comment.