The code assumes that the status bar will only be updated every
status-interval seconds
In practice status-interval is a maximum value, not a minimum value. So
if the status bar is actually updated every second even though the
configuration is for 5 seconds all of the calculations are off and the
bitrate will be calculated as a fifth of the real rate.
See https://github.com/tmux-plugins/tmux-cpu/issues/15 for a similar
issue with a different plugin, except that here it is much worse because
it actually leads to a WRONG RESULT and not just a faster update. This
commit implements @BrainMaestro 's suggestion from that thread.
Has some file spam for keeping track of everything needed but I'm only adding to an existing problem.
The code assumes that the status bar will only be updated every status-interval seconds
In practice status-interval is a maximum value, not a minimum value. So if the status bar is actually updated every second even though the configuration is for 5 seconds all of the calculations are off and the bitrate will be calculated as a fifth of the real rate.
See https://github.com/tmux-plugins/tmux-cpu/issues/15 for a similar issue with a different plugin, except that here it is much worse because it actually leads to a WRONG RESULT and not just a faster update. This commit implements @BrainMaestro 's suggestion from that thread.
Has some file spam for keeping track of everything needed but I'm only adding to an existing problem.