コード例 #1
0
ファイル: Scheduler.cs プロジェクト: Bargsteen/P5-MI-AAU
        // Check every tick if the timer hits 0
        void PoolTimeChecker()
        {
            // Check if timer is <= 0
            if (PoolTimer <= 0)
            {
                // Move current pool to actualPool
                InitialOrderPool.ForEach(o => ActualOrderPool.Add(o));
                InitialOrderPool.Clear();

                ResetTimer();
            }
            else
            {
                // Decrement timer
                PoolTimer--;
            }

            // If there is something in the current pool
            if (ActualOrderPool.Any())
            {
                // Push it to the handler one element per tick
                OrderToHandlerMover();
            }
        }
コード例 #2
0
ファイル: Scheduler.cs プロジェクト: Bargsteen/P5-MI-AAU
 private void AddOrderToPool(Order order)
 {
     InitialOrderPool.Add(order);
 }