code: public void update(long numProcessedDuringStep) {
          if (this.closed) {
              throw new ETAPrinterException("You cannot update a closed ETAPrinter!");
          }
          DateTime now = DateTime.now();
          ItemsDuration itemsDuration = null;
          if (numProcessedDuringStep > 0) {
              long stepDuration = new Duration(this.lastStep, now).getMillis();
              int numItems = 1;
              do {
                  long duration = stepDuration / (numProcessedDuringStep / numItems);
                  itemsDuration = new ItemsDuration(numItems, duration);
                  numItems++;
              } while (itemsDuration.durationMillis == 0);
          }
          this.lastStep = now;
          this.numProcessed += numProcessedDuringStep;
          if (this.numProcessed == this.totalElementsToProcess) {
              this.close();
          } else {
              this.print(itemsDuration);
          }
      }
docs: Updates and prints the progress bar with the new values.
  
  @param numProcessedDuringStep the number of items processed during the elapsed step