How to best do loops with delay in 4.7?

Works fine for me in both, are you using a macro inside of a function perhaps? Because it won’t work.