private static void Setup() { for (var hour = 7; hour <= 22; hour++) { Planes.Add(new Plane(new Time(hour, 00, 00))); } _queue = new ArrayPriorityQueue <Passenger>(10000); // _queue = new NotPrioritisingPassengerArrayQueue(10000); _producer = new PassengerProducer(Planes, _queue); _consumers = new List <PassengerConsumer>() { new PassengerConsumer(Planes, _queue), new PassengerConsumer(Planes, _queue) }; _clock = new Clock(_producer, _consumers, new Time(05, 00, 00)); }
public Clock(PassengerProducer producer, List <PassengerConsumer> consumers, Time startTime) { _producer = producer; _consumers = consumers; _millis = startTime.Millis; }