public long getDurationMillis(String key, long def) {
        String value = mValues.get(key);
        if (value != null) {
            try {
                return Long.parseLong(value);
            } catch (NumberFormatException e) {
                // fallthrough
            }
        }
        return def;
    }
{@hide}
Parse a duration in millis based on java.time.Duration or just a number (millis)
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/KeyValueListParser.java