Updates the progress bar to a new value.
3393
def update(self, value):
        ""
        if value <= 0.1:
            value = 0
        assert 0 <= value <= self.maxval
        self.currval = value
        if not self._need_update() or self.finished:
            return
        if not self.start_time:
            self.start_time = time.time()
        self.seconds_elapsed = time.time() - self.start_time
        self.prev_percentage = self.percentage()
        if value != self.maxval:
            self.fd.write(self._format_line() + '\r')
        else:
            self.finished = True
            self.fd.write(self._format_line() + '\n')
155527
public void setProgress(int progress) {
        if (progress > mMax || progress < 0) {
            throw new IllegalArgumentException(
                    String.format("Progress (%d) must be between %d and %d", progress, 0, mMax));
        }
        mProgress = progress;
        if (null != mListener) {
            if (mProgress == mMax) {
                mListener.onProgressCompleted();
            } else {
                mListener.onProgressChanged(mProgress, mMax);
            }
        }
        invalidate();
    }
497193
protected function _progressBar()
    {
        if ($this->_current > $this->_total) {
            return;
        }

        $percent = $this->_current / $this->_total;
        $nb = $percent * $this->_size;

        $b = str_repeat($this->_chars['bar'], floor($nb));
        $i = '';

        if ($nb < $this->_size) {
            $i = str_pad($this->_chars['indicator'], $this->_size - strlen($b));
        }

        $p = floor($percent * 100);

        $string = Text::insert($this->_format, compact('p', 'b', 'i'));

        $this->write("\r" . $string, $this->_color);
    }
13138
def _update_progress_bar(self):
        # type: (SyncCopy) -> None
        
        blobxfer.operations.progress.update_progress_bar(
            self._general_options,
            'synccopy',
            self._synccopy_start_time,
            self._synccopy_total,
            self._synccopy_sofar,
            self._synccopy_bytes_total,
            self._synccopy_bytes_sofar,
        )
1281731
def update_progress(opts, progress, progress_iter, out):
    '''
    
    '''
    # Look up the outputter
    try:
        progress_outputter = salt.loader.outputters(opts)[out]
    except KeyError:  # Outputter is not loaded
        log.warning('Progress outputter not available.')
        return False
    progress_outputter(progress, progress_iter)
1253226
def update(self, n=1):
    """"""
    with self._lock:
      self._pbar.update(n)
      self.refresh()
1285152
def setTotal( self, amount ):
        
        self._primaryProgressBar.setValue(0)
        self._primaryProgressBar.setMaximum(amount)
        
        if amount:
            self.setCurrentMode(XLoaderWidget.Mode.Progress)
142335
private void updateProgressBar(Progress prog, JProgressBar pbar) {
    if(prog instanceof FiniteProgress) {
      pbar.setValue(((FiniteProgress) prog).getProcessed());
      pbar.setString(((FiniteProgress) prog).toString());
    }
    else if(prog instanceof IndefiniteProgress) {
      pbar.setValue(((IndefiniteProgress) prog).getProcessed());
      pbar.setString(((IndefiniteProgress) prog).toString());
    }
    else if(prog instanceof MutableProgress) {
      pbar.setValue(((MutableProgress) prog).getProcessed());
      pbar.setMaximum(((MutableProgress) prog).getProcessed());
      pbar.setString(((MutableProgress) prog).toString());
    }
    else {
      throw new RuntimeException("Unsupported progress record");
    }
  }
600351
def _update(self):
        
        self._colorbar.halfdim = self._halfdim
        self._border.halfdim = self._halfdim

        self._label.text = self._label_str
        self._ticks[0].text = str(self._clim[0])
        self._ticks[1].text = str(self._clim[1])

        self._update_positions()

        self._colorbar._update()
        self._border._update()
859285
def update(self, value):
        

        value = int(value)

        with self.lock:
            self.value += value
984226
public function progressBarCommand(): void
    {
        $i     = 0;
        $total = 120;
        $bar   = new ProgressBar();
        $bar->start(120);

        while ($i <= $total) {
            $bar->advance();
            usleep(50000);
            $i++;
        }

        $bar->finish();
    }
1193182
def update(self, value=None, force=False, **kwargs):
        ''
        if self.start_time is None:
            self.start()
            return self.update(value, force=force, **kwargs)

        if value is not None and value is not base.UnknownLength:
            if self.max_value is base.UnknownLength:
                # Can't compare against unknown lengths so just update
                pass
            elif self.min_value <= value <= self.max_value:  # pragma: no cover
                # Correct value, let's accept
                pass
            elif self.max_error:
                raise ValueError(
                    'Value %s is out of range, should be between %s and %s'
                    % (value, self.min_value, self.max_value))
            else:
                self.max_value = value

            self.previous_value = self.value
            self.value = value

        minimum_update_interval = self._MINIMUM_UPDATE_INTERVAL
        delta = timeit.default_timer() - self._last_update_timer
        if delta < minimum_update_interval and not force:
            # Prevent updating too often
            return

        # Save the updated values for dynamic messages
        for key in kwargs:
            if key in self.dynamic_messages:
                self.dynamic_messages[key] = kwargs[key]
            else:
                raise TypeError(
                    'update() got an unexpected keyword ' +
                    'argument {0!r}'.format(key))

        if self._needs_update() or force:
            self.updates += 1
            ResizableMixin.update(self, value=value)
            ProgressBarBase.update(self, value=value)
            StdRedirectMixin.update(self, value=value)

            # Only flush if something was actually written
            self.fd.flush()
179023
def update(self):
        """"""
        if self.single_channel:
            self.im.set_data(self.data[self.ind, :, :])
        else:
            self.im.set_data(self.data[self.ind, :, :, :])
        self.ax.set_ylabel('time frame %s' % self.ind)
        self.im.axes.figure.canvas.draw()
890342
protected void updateProgressBar(CmsUploadProgessInfo info) {

        switch (info.getState()) {
            case notStarted:
                break;
            case running:
                m_progressInfo.setProgress(info);
                stopLoadingAnimation();
                break;
            case finished:
                m_progressInfo.finish();
                displayDialogInfo(
                    org.opencms.gwt.client.Messages.get().key(
                        org.opencms.gwt.client.Messages.GUI_UPLOAD_INFO_FINISHING_0),
                    false);
                startLoadingAnimation(
                    org.opencms.gwt.client.Messages.get().key(
                        org.opencms.gwt.client.Messages.GUI_UPLOAD_INFO_CREATING_RESOURCES_0),
                    1500);
                break;
            default:
                break;
        }
    }
523643
public function update_progress() {
        global $DB;
        $now = $this->get_time();
        $lastprogress = $this->lastprogresstime != 0 ? $this->lastprogresstime : $now;

        $progressrecord = new \stdClass();
        $progressrecord->id = $this->recordid;
        $progressrecord->{$this->field} = '';

        // Update database with progress.
        if ($now > $this->nextupdate) {  // Limit database updates based on time.
            list ($min, $max) = $this->get_progress_proportion_range();

            $progressrecord->{$this->field} = $min;
            $DB->update_record($this->table, $progressrecord);
            $this->nextupdate = $lastprogress + $this->interval;
        }

        // Set progress to 1 (100%) when there are no more progress updates.
        // Their is no guarantee that the final update from the get progress method
        // will be 1 even for a successful process. So we explicitly set the final DB
        // value to 1 when we are no longer in progress.
        if (!$this->is_in_progress_section()) {
            $progressrecord->{$this->field} = 1;
            $DB->update_record($this->table, $progressrecord);
        }
    }
1098951
ProgressEvent updateProgress(double val, long now) {
		if (val<0 || val>1) {
			throw new IllegalArgumentException("Value out of range [0, 1]: " + val);
		}
		if (val<=progress.getProgress()) {
			reset(start);
		}
		double pD = val - progress.getProgress();
		long tD = now - tstamp;
		if (step > 0) {
			step = step * 0.3 + (tD / pD) * 0.7; 
		} else {
			step = (tD / pD);
		}
		double etcMs = step * (1 - val);
		progress = new ProgressEvent(val, new Date(now + (long)Math.round(etcMs)));
		tstamp = now;
		return progress;
	}
838278
public function postRun(): void {
    if ($this->progress) {
      $this->progress->finish();
      // Progress bar does not print a new-line at the end.
      $this->getOutput()->writeln('');
    }
  }