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.
@romit In BAS 0, this is not a tab, but as it were, the initial page of the browser and it cannot be closed, only the following can be.
If 0 close it, then the stream itself closes as it were :)
The browser seems to be closed.
There are many solutions to do this, but which solution helps to optimize the source code is important. Please clarify the purpose, explain more clearly