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.
...\BrowserAutomationStudio\release"ScriptName"\appslocal\e3b0c442\SID505939e4\engine\prof
Check this folder for temporary profiles. They should be deleted after finishing work.