fixed time logic

This commit is contained in:
aarav18
2022-03-22 00:33:05 -06:00
parent 2e22a1a23c
commit 8af4535191
4 changed files with 5 additions and 3 deletions
@@ -70,9 +70,9 @@ public class RunCommandForTime extends CommandBase {
@Override
public boolean isFinished() {
if (this.override) {
return (((long) this.duration) >= (this.elapsed - this.start));
return (this.elapsed >= this.duration);
} else {
return (this.command.isFinished() && (((long) this.duration) >= (this.elapsed - this.start)));
return (this.command.isFinished() && (this.elapsed >= this.duration));
}
}
}