Add a Delay after pushing a button

Hi,

I need to add a delay, like 2 seconds before excuting code in a button. can anyone tell me how this can be done.

Thanks

SLEEP(2000);

should do it…

Awsome thanks

Pure curiosity, but why would you need a delay of 2 seconds??