code: public static Duration ofMillis(long millis) {
          long secs = millis / 1000;
          int mos = (int) (millis % 1000);
          if (mos < 0) {
              mos += 1000;
              secs--;
          }
          return create(secs, mos * NANOS_PER_MILLI);
      }
docs: Obtains an instance of {@code Duration} from a number of milliseconds.
  <p>
  The seconds and nanoseconds are extracted from the specified milliseconds.
  
  @param millis  the number of milliseconds, positive or negative
  @return a {@code Duration}, not null