Ejemplo n.º 1
0
        public void RegisterTimer(float interval, int repeat, bool startImmediately, TimerEntry.TimerHandler timerCallback,
                                  TimerEntry.CompleteHandler completeCallback, object param = null)
        {
            TimerEntry timer = new TimerEntry(interval, repeat, startImmediately, timerCallback, completeCallback, param);

            this._timers.Add(timer);
        }
Ejemplo n.º 2
0
        public uint Register(float interval, int repeat, bool startImmediately, TimerEntry.TimerHandler timerCallback,
                             TimerEntry.CompleteHandler completeCallback, object param = null)
        {
            TimerEntry entry = new TimerEntry(interval, repeat, startImmediately, timerCallback, completeCallback, param);

            return(this.Register(entry));
        }
Ejemplo n.º 3
0
        public void UnregisterTimer(TimerEntry.TimerHandler callback)
        {
            int count = this._timers.Count;

            for (int i = 0; i < count; i++)
            {
                TimerEntry timerEntry = this._timers[i];
                if (timerEntry.timerCallback == callback)
                {
                    this._timersToRemove.Add(timerEntry);
                }
            }
        }
Ejemplo n.º 4
0
        public void Unregister(TimerEntry.TimerHandler callback)
        {
            int count = this._objs.Count;

            for (int i = 0; i < count; i++)
            {
                TimerEntry timerEntry = this._objs[i];
                if (timerEntry.timerCallback == callback)
                {
                    this.Unregister(timerEntry);
                }
            }
        }
Ejemplo n.º 5
0
 public void TestDel(TimerEntry.TimerHandler fun)
 {
     fun.Invoke(123, 2f, null);
 }