Duration.get

Gets the value of the requested unit. !(p) This returns a value for each of the two supported units, {@link ChronoUnit#SECONDS SECONDS} and {@link ChronoUnit#NANOS NANOS}. All other units throw an exception.

@param unit the {@code TemporalUnit} for which to return the value @return the long value of the unit @throws DateTimeException if the unit is not supported @throws UnsupportedTemporalTypeException if the unit is not supported

class Duration
override
long
get

Meta