you would use a timer
first you need to decide what would trigger the pause then change to a "state" that handles the pause code
i.e.
if pause == 0 then --code not paused so do stuff here
if GetScancode() == 18 then --player press 'e' key (just example of how to pause the code)
StartTimer(e)
pause = 1 --set pause state to 1
end
else --code is paused here
if GetTimer(e) > 2000 then --check timer has reached the delay to unpause (2000 = 2seconds)
pause = 0 --set pause state back to 0
end
end
life\'s one big game
windows vista ultimate
i5 @3.3ghz, 4gb ram, AMD R9 200 series , directx 11