]> sjero.net Git - wget/blobdiff - src/retr.c
[svn] Made [0.5*wait, 1.5*wait) the range of --random-wait.
[wget] / src / retr.c
index 1df7f3bfe58a58a094c3ba350f7e1ef736bc9428..14f4ffabecfb15906349ddef9c96601d74b6b409 100644 (file)
@@ -915,9 +915,9 @@ sleep_between_retrievals (int count)
       else
        {
          /* Sleep a random amount of time averaging in opt.wait
-            seconds.  The sleeping amount ranges from 0 to
-            opt.wait*2, inclusive.  */
-         double waitsecs = 2 * opt.wait * random_float ();
+            seconds.  The sleeping amount ranges from 0.5*opt.wait to
+            1.5*opt.wait.  */
+         double waitsecs = (0.5 + random_float ()) * opt.wait;
          DEBUGP (("sleep_between_retrievals: avg=%f,sleep=%f\n",
                   opt.wait, waitsecs));
          xsleep (waitsecs);