_time is the number of seconds since script start.
To make a script hold for a period of time, you simply use:
@(_time >= 100)
Where 100, obviously, is the number of seconds you want to hold it for. Note that this will HOLD the script up completely, you can't use this method in a loop.
To use it in a loop, to make sure it runs for X seconds, you could do this:
#loop
; Your code here
?(_time >= 100): exit
~0.1
goto "loop"
edit
You could also use the timeout feature on triggers. Just enter the minimum amount of seconds it should wait, maximum and medium. If you place your code in the On Deactivation field of the trigger, the trigger will wait for that many seconds before activating the code.
Placing the same number in all three fields will set the trigger to wait that many seconds, place different numbers and you can get a random timeperiod.