def update(self, pbar):
        'Updates the widget with the current SI prefixed speed.'

        if pbar.seconds_elapsed < 2e-6 or pbar.currval < 2e-6:  # =~ 0
            return "Rate: 0 /s"
        else:
            speed = pbar.currval / pbar.seconds_elapsed
            return "Rate: {:4d} /s".format(int(speed))

        return self.format % (scaled, self.prefixes[power], self.unit)
Updates the widget with the current SI prefixed speed.
metadrive/render_pipeline/rplibs/progressbar/widgets.py