I don't know waht code you want to run, give me it and I can show you a sample.
The syntax would be different depending on what you want to do really
Well, The code is imbeded in different things, but the features are basically
Menu (using Window API) with some options
Door 1
Door 2
Door 2 is behind door 1. You open door 1, and after 6 seconds it closes. However, the door is on it's own timer, instead of mine (in the real area, the door is actually a piston staircase, so this is easier), and then door 2 is a standard door, that is opened and closed by redstone from the computer.
Additionally, theres a monitor that projects, from rednet connections, the stats of the doors.
The sleeping issue is that I have the staircase activation code (or door 1) which is a 1 second pulse, and then it projects the data to rednet, delays 6 seconds, then projects the updated data to rednet.
This causes the issue of when I want to activate the staircase, then activate the door (2) very close together. However, the issue is that when I open the staircase, I have to wait about 7s (door open pulse + 6 rednet send wait) and THEN I can open the door, meaning by the time the staircase is closed.