Sleep for milliseconds
To stay portable you could use Boost::Thread for sleeping:
#include <boost/thread/thread.hpp>int main(){ //waits 2 seconds boost::this_thread::sleep( boost::posix_time::seconds(1) ); boost::this_thread::sleep( boost::posix_time::milliseconds(1000) ); return 0;}
This answer is a duplicate and has been posted in this question before. Perhaps you could find some usable answers there too.