No developer needed, as TechMuc solved the problem. I hope you can formulate his idea without syntax error - otherwise I leave it as a little user quiz.
If I wanted to replace a function with a macro, I would rename it, f.i. wait() to WAIT(), for making clear that it's a macro. But TechMuc's idea is more elegant.