I was looking at the Duration class in Java 8 and noticed that it does not have:
long toSeconds();
But it has all other toXXXXX()
to get days, hours, minutes, millis, nanos. I do see a getSeconds()
method that returns the number of seconds within this duration object. There is also a get(TemporalUnit unit)
method to get the duration as the requested time unit. But why not keep the toSeconds()
method for consistency?