コード例 #1
0
        void OnThread()
        {
            while (true)
            {
                System.Threading.Thread.Sleep(_periodMs);

                if (_processable != null)
                {
                    _processable.Process();
                }
                else if (_loopable != null)
                {
                    _loopable.OnLoop();
                }
            }
        }
コード例 #2
0
 public void Process()
 {
     if (_idx < _loops.Count)
     {
         if (_running && _timeout.Process())
         {
             ILoopable loop = (ILoopable)_loops[_idx];
             loop.OnLoop();
             if (loop.IsDone())
             {
                 ++_idx;
             }
         }
     }
     else
     {
         _running = false;
     }
 }
コード例 #3
0
        public void Process()
        {
            if (_timeout.Process())
            {
                for (int i = 0; i < _loops.Count; ++i)
                {
                    ILoopable lp = (ILoopable)_loops[i];
                    bool      en = (bool)_enabs[i];

                    if (en)
                    {
                        lp.OnLoop();
                    }
                    else
                    {
                        /* this loopable is turned off, don't call it */
                    }
                }
            }
        }