function update_ts() {
ts = get_time()
ts_delta = ts - ts_old
- if( ts_delta < update_bw_min_delta ) {
+ if (ts_delta < update_bw_min_delta) {
# Let caller know that not much time has passed since the last update,
# so maybe not waste time with useless calculations in the face of very
# little actual change.
# Try to determine a latency trend over the last few samples
last2avg = (((ping_prev[peername] + latency) / 2.0))
thresh_fudged = (FUDGE + (ping_avgs[peername] * THRESHOLD))
- if (last2avg > thresh_fudged ) {
+ if (last2avg > thresh_fudged) {
if (latency > ping_prev[peername] && latency > ping_pprev[peername]) {
if (rx_rate < (rx_rate_max * 0.1)) { # XXX TODO is this correct?
print "# " ts " line does not appear to be loaded, skipping futile SQM bw downgrade"
slotindex[peername]++
pingslot = peername ":" slotindex[peername]
pingstats[pingslot] = latency
- if(slotindex[peername] % PINGSLOTS == 0) {
+ if (slotindex[peername] % PINGSLOTS == 0) {
if (have_baseline[peername] == 0) {
have_baseline[peername] = 1
print "# READY PEER: " peername