public long toMillis() {
        long result = Jdk8Methods.safeMultiply(seconds, 1000);
        result = Jdk8Methods.safeAdd(result, nanos / NANOS_PER_MILLI);
        return result;
    }
public long toMillis ( ) { long result = Jdk8Methods . safeMultiply ( seconds , 1000 ) ; result = Jdk8Methods . safeAdd ( result , nanos / NANOS_PER_MILLI ) ; return result ; }
Converts this duration to the total length in milliseconds.
<p>
If this duration is too large to fit in a {@code long} milliseconds, then an
exception is thrown.
<p>
If this duration has greater than millisecond precision, then the conversion
will drop any excess precision information as though the amount in nanoseconds
was subject to integer division by one million.

@return the total length of the duration in milliseconds
@throws ArithmeticException if numeric overflow occurs