code: def update(self, pbar):
          'Updates the widget to show the ETA or total time when finished.'
  
          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)f update(self, pbar):
          'Updates the widget to show the ETA or total time when finished.'
  
          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))
docs: Updates the widget to show the ETA or total time when finished.