There are two processors in my model. The goods processed by processor 1 enter processor 2 after passing through the queue. However, due to the inconsistent time between the two, processor 2 cannot work continuously. What I want to do is to set up a logic for For processor 2, if there is no goods waiting to be processed on the queue when the processing is about to end, he will extend the processing time to wait for the goods to arrive in the queue, but the maximum time cannot be exceeded. Can this logic be established?