public static Duration create(long seconds, int nanos) {
    if (seconds < -MAX_SECONDS) {
      throw new IllegalArgumentException(
          "'seconds' is less than minimum (" + -MAX_SECONDS + "): " + seconds);
    }
    if (seconds > MAX_SECONDS) {
      throw new IllegalArgumentException(
          "'seconds' is greater than maximum (" + MAX_SECONDS + "): " + seconds);
    }
    if (nanos < -MAX_NANOS) {
      throw new IllegalArgumentException(
          "'nanos' is less than minimum (" + -MAX_NANOS + "): " + nanos);
    }
    if (nanos > MAX_NANOS) {
      throw new IllegalArgumentException(
          "'nanos' is greater than maximum (" + MAX_NANOS + "): " + nanos);
    }
    if ((seconds < 0 && nanos > 0) || (seconds > 0 && nanos < 0)) {
      throw new IllegalArgumentException(
          "'seconds' and 'nanos' have inconsistent sign: seconds=" + seconds + ", nanos=" + nanos);
    }
    return new AutoValue_Duration(seconds, nanos);
  }
public static Duration create ( long seconds , int nanos ) { if ( seconds < - MAX_SECONDS ) { throw new IllegalArgumentException ( "'seconds' is less than minimum (" + - MAX_SECONDS + "): " + seconds ) ; } if ( seconds > MAX_SECONDS ) { throw new IllegalArgumentException ( "'seconds' is greater than maximum (" + MAX_SECONDS + "): " + seconds ) ; } if ( nanos < - MAX_NANOS ) { throw new IllegalArgumentException ( "'nanos' is less than minimum (" + - MAX_NANOS + "): " + nanos ) ; } if ( nanos > MAX_NANOS ) { throw new IllegalArgumentException ( "'nanos' is greater than maximum (" + MAX_NANOS + "): " + nanos ) ; } if ( ( seconds < 0 && nanos > 0 ) || ( seconds > 0 && nanos < 0 ) ) { throw new IllegalArgumentException ( "'seconds' and 'nanos' have inconsistent sign: seconds=" + seconds + ", nanos=" + nanos ) ; } return new AutoValue_Duration ( seconds , nanos ) ; }
Creates a new time duration from given seconds and nanoseconds.

@param seconds Signed seconds of the span of time. Must be from -315,576,000,000 to
+315,576,000,000 inclusive.
@param nanos Signed fractions of a second at nanosecond resolution of the span of time.
Durations less than one second are represented with a 0 `seconds` field and a positive or
negative `nanos` field. For durations of one second or more, a non-zero value for the
`nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to
+999,999,999 inclusive.
@return new {@code Duration} with specified fields.
@throws IllegalArgumentException if the arguments are out of range or have inconsistent sign.
@since 0.5