Updates the widget to show the ETA or total time when finished.
972453
def update(self, pbar):
        ''

        if pbar.currval == 0:
            return 'ETA:  --:--:--'
        elif pbar.finished:
            return 'Time: %s' % self.format_time(pbar.seconds_elapsed)
        else:
            return 'ETA:  %s' % self.format_time(self._eta(pbar))
274305
def update(self, ptime):
        """"""
        delta = self.delta + ptime
        total_duration = self.delay + self.duration

        if delta > total_duration:
            delta = total_duration

        if delta < self.delay:
            pass
        elif delta == total_duration:
            for key, tweenable in self.tweenables:
                setattr(self.target, key, tweenable.target_value)
        else:
            fraction = self.ease((delta - self.delay) / (total_duration - self.delay))

            for key, tweenable in self.tweenables:
                res = tweenable.update(fraction)
                if isinstance(res, float) and self.round:
                    res = int(res)
                setattr(self.target, key, res)

        if delta == total_duration or len(self.tweenables) == 0:
            self.complete = True

        self.delta = delta

        if self.on_update:
            self.on_update(self.target)

        return self.complete
30478
def track_update(self):
        """"""
        metadata = self.info()
        metadata.updated_at = dt.datetime.now()
        self.commit()
1305871
def _timer_update(self):
        """"""
        self._timer_counter += 1
        dot = self._timer_dots.pop(0)
        self._timer_dots = self._timer_dots + [dot]
        self._rows = [[_(u'Resolving dependencies') + dot, u'', u'', u'']]
        index = self.createIndex(0, 0)
        self.dataChanged.emit(index, index)

        if self._timer_counter > 150:
            self._timer.stop()
            self._timer_counter = 0
757068
def update(self):
        """"""
        self._controller.update(self._id, wake_if_asleep=False)
        data = self._controller.get_state_params(self._id)
        if data:
            self.__odometer = data['odometer']
        data = self._controller.get_gui_params(self._id)
        if data:
            if data['gui_distance_units'] == "mi/hr":
                self.measurement = 'LENGTH_MILES'
            else:
                self.measurement = 'LENGTH_KILOMETERS'
            self.__rated = (data['gui_range_display'] == "Rated")
619874
def _update_status(self):
        '''  '''
        label = ''
        # label format, based on time - when slow, go to higher-res display
        delta = time.time() - self.start
        if delta > self.timedelta2:
            self.label_fmt = '%5.2f%%'
        elif delta > self.timedelta1:
            self.label_fmt = '%4.1f%%'

        ratio = self.ratio
        if 0 <= ratio < 1:
            if self.label_mode:
                label = self.label_fmt % (ratio * 100)
            if self.oob_error:  # now fixed, reset
                self._first = self.styles[_if](self.icons[_if])
                self._last = self.styles[_il](self.icons[_il])
                self.oob_error = False
                self._comp_style = self.styles[_ic]
                self.done = False
        else:
            if ratio == 1:
                self.done = True
                self._comp_style = self.styles[_id]
                self._last = self.styles[_if](self.icons[_il])
                if self.label_mode:
                    label = '✓' if self.unicode_support else '+'
                if self.oob_error:  # now fixed, reset
                    self._first = self.styles[_if](self.icons[_if])
                    self.oob_error = False

            elif ratio > 1:
                self.done = True
                self.oob_error = True
                if self.unicode_support:
                    self._last = self._err_style('⏵')
                    if self.label_mode:
                        label = '✗'
                else:
                    self._last = self._err_style('>')
                    if self.label_mode:
                        label = 'ERR'
            else:  # < 0
                self.oob_error = True
                if self.unicode_support:
                    self._first = self._err_style('⏴')
                    if self.label_mode:
                        label = '✗'
                else:
                    self._first = self._err_style('<')
                    if self.label_mode:
                        label = 'ERR'
        self._lbl = label
320564
def update_done(self, *args, **kwargs):
        """"""
        kwargs['state'] = 'done'
        self.update(*args, **kwargs)
        self.rec = None
729230
def should_update(self):
        
        if self.timer.finished():
            self.timer.set(self.refresh())
            self.timer.reset()
            return self.enable()
        return False
895624
def update(self, *args):
        """"""
        if self.smart:
            self._icon.show(self.has_menu())
        else:
            self._icon.show(True)
787391
synchronized void statusUpdate(State runState, 
                                 float progress,
                                 String state, 
                                 Phase phase,
                                 long finishTime) {
    setRunState(runState);
    setProgress(progress);
    setStateString(state);
    setPhase(phase);
    if (finishTime > 0) {
      setFinishTime(finishTime); 
    }
  }
318604
@Override
    public void indicateProgress() {
        verifySystemOut();
        progressIndicatorActive = true;
        if (isAnsiEnabled()) {
            if (lastMessage != null && lastMessage.length() > 0) {
                if (!lastMessage.contains(maxIndicatorString)) {
                    updateStatus(lastMessage + indicator);
                }
            }
        } else {
            out.print(indicator);
        }
    }
256081
def finish(self):
        """"""
        self.update(self.maxval)
        if self.signal_set:
            signal.signal(signal.SIGWINCH, signal.SIG_DFL)
755335
def update(self, state, tnow):
        ''''''
        self.state = state
        self.update_time = tnow
989050
def _update(self):
        """"""
        update = False

        with self._lock:
            for fname in ['pending.data', 'completed.data']:
                data_file = join(self._data_location, fname)
                if exists(data_file):
                    mtime = getmtime(data_file)
                    if mtime > self._mtime:
                        self._mtime = mtime
                        update = True

            if update:
                self._tasks = {}
                tasklist = loads(run(['task', 'rc.verbose=nothing', 'rc.hooks=off', 'rc.data.location={self._data_location}'.format(**locals()), 'export'], stdout=PIPE).stdout.decode('utf-8'))
                for task in tasklist:
                    project = task['project'] if 'project' in task else 'unaffiliated'
                    if project not in self._tasks:
                        self._tasks[project] = {}
                    self._tasks[project][task['uuid']] = task
449613
def _update_display(self, event=None):
        """"""
        try:
            if self._showvalue:
                self.display_value(self.scale.get())
            if self._tickinterval:
                self.place_ticks()
        except IndexError:
            # happens when configure is called during a orientation change
            # because self.ticks is empty
            pass
548104
def eta
      if @current == 0
        "ETA:  --:--:--"
      else
        elapsed_time = Time.now - @start_time
        estimated_time = elapsed_time * @total / @current - elapsed_time
        sprintf("ETA:  %s", format_time(estimated_time))
      end
    end
538592
def updateUi(self):
        
        index = self._slideshow.currentIndex()
        count = self._slideshow.count()
        
        self._previousButton.setVisible(index != 0)
        self._nextButton.setText('Finish' if index == count - 1 else 'Next')
        self.autoLayout()