Choose the greater of delay_factor or self.global_delay_factor (default).
        In fast_cli choose the lesser of delay_factor of self.global_delay_factor.

        :param delay_factor: See __init__: global_delay_factor
        :type delay_factor: int
355457
def select_delay_factor(self, delay_factor):
        
        if self.fast_cli:
            if delay_factor <= self.global_delay_factor:
                return delay_factor
            else:
                return self.global_delay_factor
        else:
            if delay_factor >= self.global_delay_factor:
                return delay_factor
            else:
                return self.global_delay_factor
1074323
def send_command(self, *args, **kwargs):
        """"""
        kwargs["delay_factor"] = kwargs.get("delay_factor", 2.5)
        return super(PaloAltoPanosBase, self).send_command(*args, **kwargs)
511525
def delay(self, dl=0):
        
        if dl is None:
            time.sleep(self.dl)
        elif dl < 0:
            sys.stderr.write(
                "delay cannot less than zero, this takes no effects.\n")
        else:
            time.sleep(dl)
1182346
def delay_off(self):
        

        # Workaround for ev3dev/ev3dev#225.
        # 'delay_on' and 'delay_off' attributes are created when trigger is set
        # to 'timer', and destroyed when it is set to anything else.
        # This means the file cache may become outdated, and we may have to
        # reopen the file.
        for retry in (True, False):
            try:
                self._delay_off, value = self.get_attr_int(self._delay_off, 'delay_off')
                return value
            except OSError:
                if retry:
                    self._delay_off = None
                else:
                    raise
1291476
def _global_index():
    
    var_and_type = var + Optional(type_)
    global_dec = Suppress(upkey("global")) + index
    range_key_etc = Suppress(",") + Group(throughput) | Optional(
        Group(Suppress(",") + var_and_type).setResultsName("range_key")
    ) + Optional(Suppress(",") + include_vars) + Optional(
        Group(Suppress(",") + throughput)
    )
    global_spec = (
        Suppress("(")
        + primitive
        + Suppress(",")
        + Group(var_and_type).setResultsName("hash_key")
        + range_key_etc
        + Suppress(")")
    )
    return Group(global_dec + global_spec).setName("global index")
198610
def special_login_handler(self, delay_factor=1):
        
        delay_factor = self.select_delay_factor(delay_factor)
        i = 0
        time.sleep(delay_factor * 0.5)
        output = ""
        while i <= 12:
            output = self.read_channel()
            if output:
                if "login as" in output or "User:" in output:
                    self.write_channel(self.username + self.RETURN)
                elif "Password" in output:
                    self.write_channel(self.password + self.RETURN)
                    break
                time.sleep(delay_factor * 1)
            else:
                self.write_channel(self.RETURN)
                time.sleep(delay_factor * 1.5)
            i += 1
111750
def call_later(_seconds, _f, *args, **kwargs):
    '''
    
    '''
    cur_scale = _get_scale()
    if cur_scale == 1:
        return reactor.callLater(_seconds, _f, #@UndefinedVariable
                                 *args, **kwargs)
    else:
        _seconds = _seconds * cur_scale
        call = reactor.callLater(_seconds, _f, #@UndefinedVariable
                                 *args, **kwargs)
        return ScaledDelayedCall(cur_scale, call)
1120806
def calculate_retry_delay(attempt, max_delay=300):
    """"""
    delay = int(random.uniform(2, 4) ** attempt)
    if delay > max_delay:
        # After reaching the max delay, stop using expontential growth
        # and keep the delay nearby the max.
        delay = int(random.uniform(max_delay - 20, max_delay + 20))
    return delay
1292597
def p_delays_floatnumber(self, p):
        ''
        p[0] = DelayStatement(FloatConst(
            p[2], lineno=p.lineno(1)), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
72133
def speed(self, factor, use_semitones=False):
        
        self.command.append("speed")
        self.command.append(factor if not use_semitones else str(factor) + "c")
        return self
224100
function defer(fn) { var args
        args = slice.call(arguments, 1)
        return delay.apply(this, [fn, 0].concat(args))
    }
830908
def delay(self,
              gain_in=0.8,
              gain_out=0.5,
              delays=list((1000, 1800)),
              decays=list((0.3, 0.25)),
              parallel=False):
        
        self.command.append('echo' + ('s' if parallel else ''))
        self.command.append(gain_in)
        self.command.append(gain_out)
        self.command.extend(list(sum(zip(delays, decays), ())))
        return self
59682
def arrival_delay_greater_than(item_id, delay, namespace="_expected_arrival"):
    """"""
    expected = get_state(item_id, namespace=namespace)
    now = time.time()
    if expected and (now - expected) > delay:
        logger.error("Timeout: waited %s seconds for parent.", delay)
        return True
    elif expected:
        logger.info("Still out of order but no timeout: %s-%s <= %s.",
                    now, expected, delay)
        return False
    elif delay > 0:
        logger.info("Storing expected arrival time (%s) for context '%s'",
                    datetime.fromtimestamp(now).isoformat(), item_id)
        set_state(item_id, now, namespace=namespace)
        return False
    else:
        logger.info("Event is out of order but not waiting for parent.")
        return True
337015
def zsh_mode(self, delay_factor=1, prompt_terminator="$"):
        """"""
        delay_factor = self.select_delay_factor(delay_factor)
        self.clear_buffer()
        command = self.RETURN + "zsh" + self.RETURN
        self.write_channel(command)
        time.sleep(1 * delay_factor)
        self.set_prompt()
        self.clear_buffer()
326415
def calculateDelay(self, at, delay):
        
        if at is not None:
            return max((datetime.strptime(at, DATETIME_FORMAT) - datetime.utcnow()).total_seconds(), 0)
        elif delay is not None:
            return delay
        else:
            return 0
156314
def p_assignment_delay(self, p):
        ''
        p[0] = Assign(p[3], p[6], p[2], p[5], lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
463975
function delay(bench, fn) {
      bench._timerId = _.delay(fn, bench.delay * 1e3);
    }