def _need_update(self):
        'Returns whether the ProgressBar should redraw the line.'
        if self.currval >= self.next_update or self.finished:
            return True

        delta = time.time() - self.last_update_time
        return self._time_sensitive and delta > self.poll
Returns whether the ProgressBar should redraw the line.
metadrive/render_pipeline/rplibs/progressbar/__init__.py