Method code for $lag_watcher.lag()

[Turn on line numbering]
var lag, total, weight, lag_i, lag_d;

// the current lag floated
total = 0;
weight = 0;
for lag in (lags) {
    ++weight;
    total += lag * weight;
}
lag_i = total / 55;
lag_d = tostr((total - lag_i * 55) * 10 / 55).subrange(1, 1);
return tostr(lag_i) + "." + lag_d;

// Created 27-Mar-1995 as a part of ColdCore, see: @help Credit

Tlon