@@ -50,15 +50,16 @@ you can also set the current progress by calling the
5050
5151 If your platform doesn't support ANSI codes, updates to the progress
5252 bar are added as new lines. To prevent the output from being flooded,
53- use the method :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::preventRedrawFasterThan `
54- (it writes to the output after every N seconds) and the method
53+ use the method :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::minSecondsBetweenRedraws `
54+ to limit the number of redraws and the method
5555 :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::setRedrawFrequency `
56- (it writes to the output every N iterations) . By default, redraw frequency is
56+ to redraw every N iterations. By default, redraw frequency is
5757 **100ms ** or **10% ** of your ``max ``.
5858
5959 .. versionadded :: 4.4
6060
61- The ``preventRedrawFasterThan() `` method was introduced in Symfony 4.4.
61+ The ``minSecondsBetweenRedraws() `` and ``maxSecondsBetweenRedraws() ``
62+ methods were introduced in Symfony 4.4.
6263
6364If you don't know the exact number of steps in advance, set it to a reasonable
6465value and then call the ``setMaxSteps() `` method to update it as needed::
@@ -295,19 +296,18 @@ to display it can be customized::
295296.. caution ::
296297
297298 For performance reasons, Symfony redraws screen every 100ms. If this is too
298- fast or to slow for your application, use these methods:
299- :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::preventRedrawFasterThan `
300- :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::setRedrawFrequency `
301- :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::forceRedrawSlowerThan `::
299+ fast or to slow for your application, use the methods
300+ :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::minSecondsBetweenRedraws ` and
301+ :method: `Symfony\\ Component\\ Console\\ Helper\\ ProgressBar::maxSecondsBetweenRedraws `::
302302
303303 $progressBar = new ProgressBar($output, 50000);
304304 $progressBar->start();
305305
306306 // this redraws the screen every 100 iterations, but sets additional limits:
307- // don't redraw slower than 100ms (0.1 ) or faster than 200ms (0.2 )
307+ // don't redraw slower than 200ms (0.2 ) or faster than 100ms (0.1 )
308308 $progressBar->setRedrawFrequency(100);
309- $progressBar->forceRedrawSlowerThan (0.2);
310- $progressBar->preventRedrawFasterThan (0.1);
309+ $progressBar->maxSecondsBetweenRedraws (0.2);
310+ $progressBar->minSecondsBetweenRedraws (0.1);
311311
312312 $i = 0;
313313 while ($i++ < 50000) {
@@ -318,7 +318,7 @@ to display it can be customized::
318318
319319 .. versionadded :: 4.4
320320
321- The ``forceRedrawSlowerThan `` and ``preventRedrawFasterThan () `` methods
321+ The ``minSecondsBetweenRedraws `` and ``maxSecondsBetweenRedraws () `` methods
322322 were introduced in Symfony 4.4.
323323
324324Custom Placeholders
0 commit comments