def can_send(self):
        tdiff = time.time() - self.last_send_time
        if tdiff <= 0:
            return 0
        max_quantum = self.speed * TIME_QUANTUM
        max_send_size = max(0,
                            min(self.speed * tdiff - self.last_send_size,
                                max_quantum))
        return int(max_send_size)

    ##########################################################
:return: bytes count that can be sent now
dataset/ETHPy150Open dsiroky/snakemq/snakemq/throttle.py/ConnectionInfo.can_send