static long calcDelta(long previousMillis, long currentMillis) {
    long delta = currentMillis - previousMillis;
    if (delta <= 0) {
      throw new IllegalArgumentException(
          "Sample timestamp must be greater than previous timestamp (millisTimeStamp is "
              + currentMillis + ", previousMillis is " + previousMillis + " and delta is " + delta
              + ").");
    }
    return delta;
  }
Returns the number of bytes written so far to this archive. This does not take compression into
account.
geode-core/src/main/java/org/apache/geode/internal/statistics/StatArchiveWriter.java