How to simulate a time delay relay

Toby and Arch,
Thanks for your replies.
@ Toby, Your code is switching of the LED too fast, and holding up the rest of my code, but it works! :slight_smile:
@ Arrch, how can I put extra code inside to avoid blocking the processor?
I don't completely understand how to translate your code to my script. (I'm pretty new with C++).