예제 #1
0
 // Use this for initialization
 void Start()
 {
     index = 0;
     quit  = false;
     tPool = new MsgPool <inner>(worker);
     timer = new tTimer(new TimerCallback(counting), null, Timeout.Infinite, Timeout.Infinite);
     timer.Change(100, Timeout.Infinite);
 }
예제 #2
0
        public void sendDelayedMsg(int state, int delay, CUnit receiver)
        {
            CMsg msg = new CMsg();

            msg.state        = state;
            msg.sender       = this;
            msg.receiver     = receiver;
            msg.deliveryTime = delay;

            MsgPool.addElement(msg);
        }