':return: True if we have to flush the output'

def should_flush(self):

    if (self._last_output_flush is None):
        return True
    time_diff = (time.time() - self._last_output_flush)
    if (time_diff >= self.FLUSH_TIMEOUT):
        return True
    return False
