Of the Duration class in the new JSR 310 date API (java.time package) available in Java 8 and later, the javadoc says :
This class models a quantity o
The documentation says:
This returns a value for each of the two supported units, SECONDS and NANOS. All other units throw an exception.
So, best guess answer -- that's the way they designed it.
You can use some of the other methods to get it in hours:
long hours = duration.toHours();
or minutes:
long minutes = duration.toMinutes();