Duration

Class Duration

All Implemented Interfaces:
Serializable, Comparable<Duration>, TemporalAmount
public final class Duration
extends Object
implements TemporalAmount, Comparable<Duration>, Serializable

A time-based amount of time, such as '34.5 seconds'.

This class models a quantity or amount of time in terms of seconds and nanoseconds. It can be accessed using other duration-based units, such as minutes and hours. In addition, the DAYS<