public static bool Unregister(string key)
 {
     if (key == null)
     {
         throw new ArgumentNullException(key);
     }
     return(TimerBase <T> .GetInstance()?.UnregisterInternal(key));
 }
        public static void Unregister()
        {
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.OnRemove();
            }
        }
        public static void Register(string key, float timeout, Action <float> onTimer)
        {
            if (key == null)
            {
                throw new ArgumentNullException(key);
            }
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.RegisterInternal(key, timeout, timeout, onTimer, null, null, 1);
            }
        }
        public static void Register(string key, float delay, float interval, Action <float> onTimer, Action onCanceled, int times)
        {
            if (key == null)
            {
                throw new ArgumentNullException(key);
            }
            T instance = TimerBase <T> .GetInstance();

            if (instance != null)
            {
                instance.RegisterInternal(key, delay, interval, onTimer, null, onCanceled, times);
            }
        }
 public static ulong Register(float delay, float interval, Action <float> onTimer) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, delay, interval, onTimer, null, null, 1);
 public static ulong Register(float timeout, Action <float> onTimer, int times) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, timeout, timeout, onTimer, null, null, times);
 public static ulong Register(float timeout, Action onTimer, Action onCanceled) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, timeout, timeout, null, onTimer, onCanceled, 1);
 public static bool Unregister(ulong id) =>
 TimerBase <T> .GetInstance()?.UnregisterInternal((long)id);
 public static ulong Register(float delay, float interval, Action onTimer, Action onCanceled, int times) =>
 TimerBase <T> .GetInstance()?.RegisterInternal(null, delay, interval, null, onTimer, onCanceled, times);