Searched refs:n_ticks (Results 1 - 1 of 1) sorted by last modified time

/freebsd-11-stable/contrib/ntp/sntp/libevent/
H A Dbufferevent_ratelim.c80 unsigned n_ticks = current_tick - bucket->last_updated; local
84 if (n_ticks == 0 || n_ticks > INT_MAX)
88 bucket->limit += n_ticks * cfg->rate;
96 if ((cfg->read_maximum - bucket->read_limit) / n_ticks < cfg->read_rate)
99 bucket->read_limit += n_ticks * cfg->read_rate;
102 if ((cfg->write_maximum - bucket->write_limit) / n_ticks < cfg->write_rate)
105 bucket->write_limit += n_ticks * cfg->write_rate;

Completed in 61 milliseconds