Duration.getDurationSeconds() implementation