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
            scaled = power = 0
        else:
            scaled, power = self._speed(pbar)

        return self.format % (scaled, self.prefixes[power], self.unit)
def update ( self , pbar ) : if pbar . seconds_elapsed < 2e-6 or pbar . currval < 2e-6 : scaled = power = 0 else : scaled , power = self . _speed ( pbar ) return self . format % ( scaled , self . prefixes [ power ] , self . unit )
Updates the widget with the current SI prefixed speed.