public static long convertDurationStrToLong(String duration, boolean convertYearToMonth) {
    return convertDurationStrToLong(-1, duration, convertYearToMonth);
  }
Convert duration string to time value. CurrentTime is used to calculate the days of natural
month. If it's set as -1, which means a context free situation, then '1mo' will be thought as
30 days.

@param duration represent duration string like: 12d8m9ns, 1y1mo, etc.
@return time in milliseconds, microseconds, or nanoseconds depending on the profile
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/DateTimeUtils.java