Here's a suggestion:
Mark the time when starting the thread.
Then during the script run, add a time check action and compare the time difference with your desired value.
-> Take appropriate action.
It worked fine for me too for some time without any issues. Suddenly it automatically deletes the account I registered earlier after confirming the email. Any ideas?