public static long getEstimateTimePartitionSize(long startTime, long endTime) {
    if (endTime > 0 && startTime < 0) {
      return BigInteger.valueOf(endTime)
              .subtract(BigInteger.valueOf(startTime))
              .divide(bigTimePartitionInterval)
              .longValue()
          + 1;
    }
    return (endTime - startTime) / timePartitionInterval + 1;
  }
Time range for dividing database, the time unit is the same with IoTDB's TimestampPrecision
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/TimePartitionUtils.java