If I read that question right, you will need to use the
nDelayTime = 5000 : Rem five seconds
nEvent As Integer
nEvent = Timer() + nDelayTime
Repeat
Rem ... Code
If Timer()>nEvent Then FunctionContinue()
Rem ... Other code
Sync
Until ReturnKey()
End
FUNCTION FunctionContinue()
Rem code to execute after delay
ENDFUNCTION
The rest of the program will run but the FunctionContinue will not execute until five seconds after the initialisation of nEvent.
"Man who looses key to woman's appartment...... He get no nookie" - A wise chinese man.