code: private static BigDecimal computeSeconds(Duration d) {
      return d.getSeconds().add(new BigDecimal(d.getDays().multiply(BigInteger.valueOf(24))
                                               .add(d.getHours()).multiply(BigInteger.valueOf(60))
                                               .add(d.getMinutes()).multiply(BigInteger.valueOf(60))));
    }
docs: Returns the total number of seconds specified by the days, hours, minuts and seconds fields of
  the duration.