2012-05-22から1日間の記事一覧
thread中にsleepさせるコード。 #include <iostream> #include <thread> #include <chrono> int main() { int count = 0; while (1) { std::cout << "Wait..." << count++ << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(2000)); std::cout << "waited 2000 ms" </chrono></thread></iostream>…