code: public static Comparator<Duration<ClockUnit>> comparatorOnClock() {
  
          return (d1, d2) -> {
              long s1 = lengthInSeconds(d1);
              long s2 = lengthInSeconds(d2);
  
              if (s1 < s2) {
                  return -1;
              } else if (s1 > s2) {
                  return 1;
              } else {
                  long n1 = d1.getPartialAmount(NANOS) % MRD;
                  long n2 = d2.getPartialAmount(NANOS) % MRD;
                  if (d1.isNegative()) {
                      n1 = Math.negateExact(n1);
                  }
                  if (d2.isNegative()) {
                      n2 = Math.negateExact(n2);
                  }
                  return ((n1 < n2) ? -1 : ((n1 > n2) ? 1: 0));
              }
          };
  
      }
docs: /*[deutsch]
  <p>Liefert einen {@code Comparator} geeignet f&uuml;r uhrzeitbasierte Dauerobjekte. </p>
  
  <p>Eine negative Dauer ist immer kleiner als eine positive. Beispiel: </p>
  
  <pre>
  Duration&lt;ClockUnit&gt; d1 = Duration.parseClockPeriod(&quot;PT22M2.666S&quot;);
  Duration&lt;ClockUnit&gt; d2 = Duration.parseClockPeriod(&quot;-PT25M&quot;);
  Duration&lt;ClockUnit&gt; d3 = Duration.parseClockPeriod(&quot;PT21M62.667S&quot;);
  Duration&lt;ClockUnit&gt; d4 = Duration.parseClockPeriod(&quot;PT22M2.667S&quot;);
  Stream&lt;Duration&lt;ClockUnit&gt;&gt; s = Stream.of(d1, d2, d3, d4);
  assertThat(s.max(Duration.comparatorOnClock()).get(), is(d3));
  </pre>
  
  @return  Comparator for clock-based durations
  @since   5.0