assign timer to class field

This commit is contained in:
CWX
2025-01-22 13:45:59 +00:00
parent 59e73f5a58
commit 57fc237d64
+2 -3
View File
@@ -79,9 +79,8 @@ public class App
foreach (var onLoad in _onLoad)
await onLoad.OnLoad();
_ = new Timer(_ => Update(_onUpdate), null, TimeSpan.Zero, TimeSpan.FromMilliseconds(5000));
_timer = new Timer(_ => Update(_onUpdate), null, TimeSpan.Zero, TimeSpan.FromMilliseconds(5000));
_logger.Success(GetRandomisedStartMessage());
}