Exemplo n.º 1
0
        /// <summary>
        /// autoRecycled
        /// </summary>
        public void AddTimer(int expire, TimerPassedDelegate callBack)
        {
            ITimer timer = Pop();

            timer.Init(expire, callBack, false, true);
            AddDict(timer);
        }
Exemplo n.º 2
0
        public ITimer AddTimer(int expire, TimerPassedDelegate callBack, bool loop)
        {
            ITimer tmp = CoreModules.timerMDL.AddTimer(expire, callBack, loop);

            dict.AddOrReplace(tmp.ID, tmp);
            return(tmp);
        }
Exemplo n.º 3
0
        public ITimer AddTimer(int expire, TimerPassedDelegate callBack, bool loop)
        {
            ITimer timer = Pop();

            timer.Init(expire, callBack, loop, false);
            AddDict(timer);
            return(timer);
        }
Exemplo n.º 4
0
 public void Init(int expire, TimerPassedDelegate callBack, bool loop, bool autorecycled)
 {
     AutoRecycled = autorecycled;
     current      = 0;
     m_expire     = expire;
     m_callBack   = callBack;
     m_loop       = loop;
     Enable       = expire > 0;
 }
Exemplo n.º 5
0
 public void Clear()
 {
     current      = 0;
     m_expire     = 0;
     m_callBack   = null;
     m_loop       = false;
     Enable       = false;
     AutoRecycled = false;
 }
Exemplo n.º 6
0
 public void AddTimer(int expire, TimerPassedDelegate callBack)
 {
     CoreModules.timerMDL.AddTimer(expire, callBack);
 }