To limit the overall length, set the test <block> in the script to the desired /timeout (in milliseconds). I.e. if you want the block to simply end after, say, 5 minutes, specify
<block test>/ timeout = 300000
/ preinstructions = (test)
/ onblockbegin = [values.totalscore=0]
/ stop = [values.stopblock==1]
/ trials = [1=newround]
I'd reconsider lithe other change, automatically moving on to the next problem after a set amount of time. Reasons:
- It's not straightforward to implement at all, albeit perhaps not impossible.
- More importantly, this has potentially far-ranging consequences for the scoring, i.e. it's not necessarily clear how to deal with that. At a minimum you' have to fully work that out before you start thinking about implementing some kind of per-problem time limit.