From 487581afb7430f484cd8c744ff230fbaf96b703c Mon Sep 17 00:00:00 2001 From: luksteph <131851172+luksteph@users.noreply.github.com> Date: Mon, 28 Apr 2025 15:31:28 -0400 Subject: [PATCH] Clarify Elapsed/ETA format for >24h renders --- .../squaremap/common/task/render/RenderProgress.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/src/main/java/xyz/jpenilla/squaremap/common/task/render/RenderProgress.java b/common/src/main/java/xyz/jpenilla/squaremap/common/task/render/RenderProgress.java index 787c6ccc..c614c1cd 100644 --- a/common/src/main/java/xyz/jpenilla/squaremap/common/task/render/RenderProgress.java +++ b/common/src/main/java/xyz/jpenilla/squaremap/common/task/render/RenderProgress.java @@ -110,10 +110,10 @@ public void run() { ); } - private static String formatMilliseconds(final long timeLeft) { - final int hrs = (int) TimeUnit.MILLISECONDS.toHours(timeLeft) % 24; - final int min = (int) TimeUnit.MILLISECONDS.toMinutes(timeLeft) % 60; - final int sec = (int) TimeUnit.MILLISECONDS.toSeconds(timeLeft) % 60; - return String.format("%02d:%02d:%02d", hrs, min, sec); + private static String formatMilliseconds(final long timeInMs) { + final int hrs = (int) TimeUnit.MILLISECONDS.toHours(timeInMs); + final int min = (int) TimeUnit.MILLISECONDS.toMinutes(timeInMs) % 60; + final int sec = (int) TimeUnit.MILLISECONDS.toSeconds(timeInMs) % 60; + return String.format("%02dh%02dm%02ds", hrs, min, sec); } }