dhcpcanon/timers.py
def gen_rebinding_time(lease_time, elapsed=0):
    """."""
    rebinding_time = int(lease_time) * REBIND_PERC - elapsed
    # FIXME:90 [:rfc:`2131#section-4.4.5`]: the chosen "fuzz" could fingerprint
    # the implementation
    # NOTE: here using same "fuzz" as systemd?
    range_fuzz = int(lease_time) - rebinding_time
    logger.debug('rebinding fuzz range %s', range_fuzz)
    fuzz = random.uniform(-(range_fuzz),
                          +(range_fuzz))
    rebinding_time += fuzz
    logger.debug('Rebinding time %s.', rebinding_time)
    return rebinding_time
def gen_rebinding_time(lease_time, elapsed=0):
    """."""
    rebinding_time = int(lease_time) * REBIND_PERC - elapsed
    # FIXME:90 [:rfc:`2131#section-4.4.5`]: the chosen "fuzz" could fingerprint
    # the implementation
    # NOTE: here using same "fuzz" as systemd?
    range_fuzz = int(lease_time) - rebinding_time
    logger.debug('rebinding fuzz range %s', range_fuzz)
    fuzz = random.uniform(-(range_fuzz),
                          +(range_fuzz))
    rebinding_time += fuzz
    logger.debug('Rebinding time %s.', rebinding_time)
    return rebinding_time
def gen_rebinding_time ( lease_time , elapsed = 0 ) : rebinding_time = int ( lease_time ) * REBIND_PERC - elapsed # FIXME:90 [:rfc:`2131#section-4.4.5`]: the chosen "fuzz" could fingerprint # the implementation # NOTE: here using same "fuzz" as systemd? range_fuzz = int ( lease_time ) - rebinding_time logger . debug ( 'rebinding fuzz range %s' , range_fuzz ) fuzz = random . uniform ( - ( range_fuzz ) , + ( range_fuzz ) ) rebinding_time += fuzz logger . debug ( 'Rebinding time %s.' , rebinding_time ) return rebinding_time
.
.