code: public double[] run(int times) {
          if (engine == null) {
              throw new RuntimeException("[benchmark error] engine not set for benchmark");
          }
  
          double[] runtimes = new double[times];
          final int offset = engine.getInputVariables().size();
          for (int t = 0; t < times; ++t) {
              obtained = new ArrayList<double[]>(expected.size());
              for (int i = 0; i < expected.size(); ++i) {
                  obtained.add(new double[engine.numberOfInputVariables()
                          + engine.numberOfOutputVariables()]);
              }
              engine.restart();
              long start = System.nanoTime();
  
              for (int evaluation = 0; evaluation < expected.size(); ++evaluation) {
                  double[] expectedValues = expected.get(evaluation);
                  double[] obtainedValues = obtained.get(evaluation);
  
                  if (expectedValues.length < engine.getInputVariables().size()) {
                      throw new RuntimeException(MessageFormat.format(
                              "[benchmark error] the number of input values given <{0}> "
                              + "at line <{1}> must be at least the same number of input variables "
                              + "<{2}> in the engine",
                              expectedValues.length, evaluation + 1, engine.numberOfInputVariables()));
                  }
  
                  for (int i = 0; i < engine.getInputVariables().size(); ++i) {
                      engine.getInputVariables().get(i).setValue(expectedValues[i]);
                      obtainedValues[i] = expectedValues[i];
                  }
  
                  engine.process();
  
                  for (int i = 0; i < engine.getOutputVariables().size(); ++i) {
                      obtainedValues[i + offset] = engine.getOutputVariables().get(i).getValue();
                  }
              }
  
              long end = System.nanoTime();
              runtimes[t] = end - start;
          }
  
          for (double x : runtimes) {
              this.times.add(x);
          }
          return runtimes;
      }
docs: Runs the benchmark on the engine multiple times
  
  @param times is the number of times to run the benchmark on the engine
  @return vector of the time in nanoseconds required by each run, which is
  also appended to the times stored in Benchmark::getTimes()