code: public double getDurationMs() {
          double durationMs = 0;
          for (Duration duration : durations) {
              if (duration.taskFinished()) {
                  durationMs += duration.getDurationMS();
              }
          }
          return durationMs;
      }
docs: Returns the duration of the measured tasks in ms