StatChannel
Tracks the throughput of a single byte stream: pure-Kotlin port of libtorrent's stat_channel (stat.hpp, stat.cpp).
Each channel keeps three numbers:
a 64-bit running total of every byte ever counted,
a 32-bit counter accumulating the bytes seen this tick (reset each secondTick), and
a 32-bit exponentially-smoothed rate in bytes/second.
libtorrent uses one of these per direction-and-class (payload vs protocol vs IP overhead); Stat bundles six of them. Counters are signed like the C++ (int32 / int64); overflow is asserted away there and simply not guarded here, matching the "callers never feed absurd values" contract.
Functions
Alias for rate; libtorrent keeps low_pass_rate() as a synonym.
Folds another channel's current-tick contribution into this one, mirroring stat_channel::operator+=. Note libtorrent adds the source's counter to both this counter and this total (it does not add the source total).
Advances the smoothed rate and resets the per-tick counter. Should be called once per "second", with the real elapsed tickIntervalMs so the rate is normalised to bytes/second even when ticks drift.