title: How does "curl --retry-max-time <seconds>" work?
body: <p>I don't know how <code>--retry-max-time</code> calculated.
  If I download a file <code>file.txt</code>:</p>
  
  <pre><code>curl --max-time 10 --retry 3 --retry-delay 5 --retry-max-time 32 'http://www.site.com/download/file.txt'
  </code></pre>
  
  <hr>
  
  <ul>
  <li><code>[ 0- 2]</code> It takes <code>2s</code> to download <code>50%</code> of the file, and no speed any more.</li>
  <li><code>[ 2-10]</code> It waits for another <code>8s</code>, still no speed, timeout, will retry</li>
  <li><code>[10-15]</code> It waits for <code>5s</code> before retry #1</li>
  <li><code>[15-25]</code> Still no speed, will retry</li>
  <li><code>[25-30]</code> It waits for <code>5s</code> before retry #2</li>
  <li><code>[30-34]</code> It takes <code>4s</code> to download <code>33%</code> of the file, and no speed any more.</li>
  <li><code>[34-40]</code> It waits for another <code>6s</code>, still no speed, timeout</li>
  </ul>
  
  <p>Will <code>curl</code> stop retry at this point(<code>40s</code>)?</p>
  
  <p>When was the <code>retry timer</code> started and stopped?</p>
  
  <hr>
  
  <pre><code>   --retry-max-time &lt;seconds&gt;
            The  retry  timer  is reset before the first transfer attempt. Retries will be done as usual (see --retry) as
            long as the timer hasn't reached this given limit. Notice that if the timer hasn't  reached  the  limit,  the
            request  will be made and while performing, it may take longer than this given time period. To limit a single
            request´s maximum time, use -m, --max-time.  Set this option to  zero  to  not  timeout  retries.  (Added  in
            7.12.3)
  </code></pre>