示例#1
0
        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;
            }
        }