@Override
    public Duration convertFrom(String value) {
        // ISO8601 format
        if (value.startsWith("P")) {
            final Period period = Period.parse(value);
            return Duration.parse(period.toString());
        }
        // number + unit formats
        final com.github.joschi.jadconfig.util.Duration jadDuration = com.github.joschi.jadconfig.util.Duration.parse(value);
        final ChronoUnit chronoUnit = toChronoUnit(jadDuration.getUnit());
        return Duration.of(jadDuration.getQuantity(), chronoUnit);
    }
@Test
    public void convertFrom() {
        assertThat(converter.convertFrom("10ms")).isEqualTo(Duration.ofMillis(10));
        assertThat(converter.convertFrom("10s")).isEqualTo(Duration.ofSeconds(10));
        assertThat(converter.convertFrom("PT0.01S")).isEqualTo(Duration.ofMillis(10));
        assertThat(converter.convertFrom("PT10S")).isEqualTo(Duration.ofSeconds(10));
    }