code: private static double getDurationInSecs(
        ViewData.AggregationWindowData.CumulativeData cumulativeData) {
      return toDoubleSeconds(cumulativeData.getEnd().subtractTimestamp(cumulativeData.getStart()));
    }
docs: Calculates the duration of the given CumulativeData in seconds.