private void HandleTimer(TimerAction timerAction) { switch (timerAction.TimerType) { case TimerType.OnceTimer: timerAction.Callback?.Invoke(); Remove(timerAction); break; case TimerType.RepeatedTimer: timerAction.Callback?.Invoke(); AddTimer(timerAction); break; } }