Duration Example Java 8

The Duration (java.time.Duration package) is the amount of time between two Instant’s, between two LocalDateTime or between two LocalTime . Using Duration we measures time in seconds...