Logo

Programming-Idioms

History of Idiom 45 > diff from v29 to v30

Edit summary for version 30 by :
New Cpp implementation by user [GhassanPL]

Version 29

2016-02-16, 17:45:36

Version 30

2016-02-16, 17:59:47

Idiom #45 Pause execution for 5 seconds

Sleep for 5 seconds in current thread, before proceeding with next instructions.

Idiom #45 Pause execution for 5 seconds

Sleep for 5 seconds in current thread, before proceeding with next instructions.

Imports
#include <thread>
#include <chrono>
Code
std::this_thread::sleep_for(5s);
Doc URL
http://en.cppreference.com/w/cpp/thread/sleep_for