updated standalone classes
This commit is contained in:
@@ -112,6 +112,11 @@ public class SimpleLoadingBar {
|
||||
}
|
||||
|
||||
|
||||
protected long getPassedMinutes() {
|
||||
return startTime.until(LocalTime.now().truncatedTo(ChronoUnit.MINUTES), ChronoUnit.MINUTES);
|
||||
}
|
||||
|
||||
|
||||
private void setEndTime(LocalTime endTime) {
|
||||
this.endTime = endTime;
|
||||
this.totalMinutes = startTime.until(endTime, ChronoUnit.MINUTES);
|
||||
@@ -128,7 +133,7 @@ public class SimpleLoadingBar {
|
||||
|
||||
|
||||
private void showLoadingBar() {
|
||||
long passedMinutes = startTime.until(LocalTime.now().truncatedTo(ChronoUnit.MINUTES), ChronoUnit.MINUTES);
|
||||
long passedMinutes = getPassedMinutes();
|
||||
// long passedMinutes = 0; // DEBUG
|
||||
if (passedMinutes > totalMinutes) {
|
||||
passedMinutes = totalMinutes;
|
||||
|
Reference in New Issue
Block a user