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.
Your threading issues get me so curious! You'll need to start sending your projects(s) into @Fox or @support so they can dissect the code to find the cause of these effects bud.