'Received signal. Cancel previous timer and store args to be forwarded later.'

def signalReceived(self, *args):

    if self.block:
        return
    self.args = args
    if (self.rateLimit == 0):
        self.timer.stop()
        self.timer.start(((self.delay * 1000) + 1))
    else:
        now = time()
        if (self.lastFlushTime is None):
            leakTime = 0
        else:
            lastFlush = self.lastFlushTime
            leakTime = max(0, ((lastFlush + (1.0 / self.rateLimit)) - now))
        self.timer.stop()
        self.timer.start(((min(leakTime, self.delay) * 1000) + 1))
