int _tmain(int argc, _TCHAR* argv[]) { const int time_span = 16 * 4; std::chrono::system_clock::time_point wake_up_time; Director dr; while (dr.work) { dr.proc(); wake_up_time = std::chrono::system_clock::now() + std::chrono::milliseconds(time_span); while (std::chrono::system_clock::now() < wake_up_time) std::this_thread::sleep_for(std::chrono::milliseconds(1)); } return 0; }