You can use the following code in your service (when it begins the service or when it ends the service or exits the blog):
time()-ped.getBlockEnterTime()
This will give you the total time the pedestrian has been in the service block. With that you can use your condition to make the pedestrian satisfied or unsatisfied.
This is one option
The other option is to trigger a user controlled event when the pedestrian enters the block and make the pedestrian unsatisfied if it's activated:
- when it enters the block do ped.event.restart(5);
- when the agent leaves the block do ped.event.reset();
- in the event make the code necessary to make the pedestrian unsatisfied
The difference is that the second technique will make the customer unsatisfied when it's in the queue, while the first technique will make him unsatisfied only after it leaves the queue