private static void Setup() { for (var hour = 7; hour <= 22; hour++) { Planes.Add(new Plane(new Time(hour, 00, 00))); } // _queue = new NotPrioritisingPassengerArrayQueue(noPassengers); _queue = new PriorityQueue <Passenger>(NoPassengers); _producer = new PassengerProducer(Planes, _queue); for (var i = 0; i < ConsumerAmount; i++) { _consumers.Add(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; }