docs: public WSStatistic rateOfChange(WSStatistic otherStat) {
          if (!validate(otherStat)) {
              return null;
          }
  
          TimeStatisticImpl other = (TimeStatisticImpl) otherStat;
          TimeStatisticImpl newData = new TimeStatisticImpl(id);
          long timeDiff = lastSampleTime - other.lastSampleTime;
  
          if (timeDiff == 0) {
              return null;
          }
  
          // rate of change
          newData.count = (count - other.getCount()) / timeDiff;
          newData.sumOfSquares = (sumOfSquares - other.sumOfSquares) / timeDiff;
          newData.total = (total - other.getTotal()) / timeDiff;
  
          newData.startTime = startTime;
          newData.lastSampleTime = lastSampleTime;
          newData.max = max;
          newData.min = min;
  
          return newData;
      }