dhcpcanon/timers.py
def gen_delay_selecting():
    """Generate the delay in seconds in which the DISCOVER will be sent.

    [:rfc:`2131#section-4.4.1`]::

        The client SHOULD wait a random time between one and ten seconds to
        desynchronize the use of DHCP at startup.

    """
    delay = float(random.randint(0, MAX_DELAY_SELECTING))
    logger.debug('Delay to enter in SELECTING %s.', delay)
    logger.debug('SELECTING will happen on %s',
                 future_dt_str(nowutc(), delay))
    return delay
def gen_delay_selecting():
    """Generate the delay in seconds in which the DISCOVER will be sent.

    [:rfc:`2131#section-4.4.1`]::

        The client SHOULD wait a random time between one and ten seconds to
        desynchronize the use of DHCP at startup.

    """
    delay = float(random.randint(0, MAX_DELAY_SELECTING))
    logger.debug('Delay to enter in SELECTING %s.', delay)
    logger.debug('SELECTING will happen on %s',
                 future_dt_str(nowutc(), delay))
    return delay
Generate the delay in seconds in which the DISCOVER will be sent.

    [:rfc:`2131#section-4.4.1`]::

        The client SHOULD wait a random time between one and ten seconds to
        desynchronize the use of DHCP at startup.