solved issue on duration

This commit is contained in:
Lucio Lelii 2022-12-15 15:36:12 +01:00
parent 0420e2ba3e
commit d0a7197c5c
1 changed files with 5 additions and 3 deletions

View File

@ -70,9 +70,11 @@ public class ScriptStatus {
long toUse = finished;
if (finished < 0)
toUse = System.currentTimeMillis();
long minutes = (toUse/1000)/60;
long seconds = (toUse/1000)%60;
long duration = toUse - this.start;
long minutes = (duration/1000)/60;
long seconds = (duration/1000)%60;
return String.format("%d minutes %d seconds", minutes, seconds);
}