mirror of
https://github.com/robertvokac/time-calc.git
synced 2025-03-25 07:27:49 +01:00
Added several improvements
This commit is contained in:
parent
451461e7b3
commit
532fe70e56
@ -41,6 +41,9 @@ public class Main {
|
|||||||
args[1] = "0:00";
|
args[1] = "0:00";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(args.length == 1) {
|
||||||
|
args = new String[]{args[0], "0:00"};
|
||||||
|
}
|
||||||
if (args.length < EXPECTED_ARG_COUNT) {
|
if (args.length < EXPECTED_ARG_COUNT) {
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
"Expected arg count is " + EXPECTED_ARG_COUNT
|
"Expected arg count is " + EXPECTED_ARG_COUNT
|
||||||
@ -104,7 +107,9 @@ public class Main {
|
|||||||
.format("%02d", minuteRemains) + " until end " + String
|
.format("%02d", minuteRemains) + " until end " + String
|
||||||
.format("%02d", endHour) + ":" + String
|
.format("%02d", endHour) + ":" + String
|
||||||
.format("%02d", endMinute));
|
.format("%02d", endMinute));
|
||||||
printPercentToAscii(done);
|
if(System.getProperty("progress")!=null) {
|
||||||
|
printPercentToAscii(done);
|
||||||
|
}
|
||||||
if(hourRemains <= 0 && minuteRemains <= 0) {
|
if(hourRemains <= 0 && minuteRemains <= 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user