code: def update(self, pbar):
          
          if pbar.currval == 0:
              return 'ETA:  --:--:--'
          elif pbar.finished:
              return 'Time: %s' % self.format_time(pbar.seconds_elapsed)
          else:
              elapsed = pbar.seconds_elapsed
              currval1, elapsed1 = self._update_samples(pbar.currval, elapsed)
              eta = self._eta(pbar.maxval, pbar.currval, elapsed)
              if pbar.currval > currval1:
                  etasamp = self._eta(pbar.maxval - currval1,
                                      pbar.currval - currval1,
                                      elapsed - elapsed1)
                  weight = (pbar.currval / float(pbar.maxval)) ** 0.5
                  eta = (1 - weight) * eta + weight * etasamp
              return 'ETA:  %s' % self.format_time(eta)
docs: Updates the widget to show the ETA or total time when finished.