I have a function that is continuously looking for active services on the network with its name and port, but it is endless.
I would like to know how to stop the execution after 30 seconds or something like that. Since the original method has no stop mechanism.
I don't have code yet to publish, because I don't know where to start with this.
Thank you for any advice.