I am planning to make a simulation for bus stops. I want to know how to make a processor pick up items for 2 mins from a queue up to 30 items(it could pick up less then 30 items and still go into process if the queue has less than 30 but max is 30 ). then stops picking up item from the queue and do all the processing for all the items and not pick up additional items waiting in the queue when processing the items picked up. Then the processor would rest for 8mins and repeat the process and start to pick up items again