code: public final void setDuration(int duration) {
          if (isComplete()) {
              this.getLogger()
                      .warn(
                              "{} is already closed, the new duration of {} will be ignored on: {}",
                              this.getClass().getSimpleName(),
                              duration,
                              this);
              return;
          }
          this.duration = duration;
      }
docs: Set the duration of the interval