Hi,
You can look into using STOP-AFTER, it was introduced in 10.2 (off the top of my head).
From the online help:
"STOP-AFTER expression
The STOP-AFTER phrase specifies a time-out value for a DO, FOR, or REPEAT block. The integer expression specifies the number of seconds each iteration...