diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-21 10:41:53 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-21 10:41:53 -0500 |
| commit | 7497db57e8a44769d1a098ad189247ea4e980a1d (patch) | |
| tree | 189ff962d5125fe2526e4f79dccb009379725fdf /src/slskd/Common | |
| parent | 8e152ed6eccd5650179f2875eef4aa21243c8c15 (diff) | |
| parent | 28fa7202724da10075dbddc3244d5d5528b4bdad (diff) | |
| download | slskd-7497db57e8a44769d1a098ad189247ea4e980a1d.tar.gz | |
Merge pull request #1769 from slskd/reports
Collect and broadcast real-time transfer metrics, add a footer to the UI to display them
Diffstat (limited to 'src/slskd/Common')
| -rw-r--r-- | src/slskd/Common/ExponentialMovingAverage.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/slskd/Common/ExponentialMovingAverage.cs b/src/slskd/Common/ExponentialMovingAverage.cs index aaa6e5ea..6bc773cb 100644 --- a/src/slskd/Common/ExponentialMovingAverage.cs +++ b/src/slskd/Common/ExponentialMovingAverage.cs @@ -73,6 +73,16 @@ namespace slskd private Action<double> OnUpdate { get; } /// <summary> + /// Resets the value. + /// </summary> + public void Reset() + { + Value = 0; + Initialized = false; + OnUpdate?.Invoke(Value); + } + + /// <summary> /// Updates the average with a new value. /// </summary> /// <param name="value"></param> |
