How to do Delay in C++

The way you do this in C++ is to use timers. There are some examples here: