get from Stack Overflow
std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
Sleep(1000);
std::chrono::steady_clock::time_point end = std::chrono::steady_clock::now();
std::cout << "Time difference = " << std::chrono::duration_cast<std::chrono::milliseconds> (end - begin).count() << std::endl;
网友评论