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.
If your cookies in same format as BAS, you just read it from file to variable and go Network-load cookies-set cookies for browser. If format of your cookies not compatible with BAS, compare and convert all your cookies in right format
use http client if you want speed . if browser is only solution then you need to disable everything you can ex . images, scripts and other blockable objects .