Sleep 比对 (Win32API 与 STL )

	OutputDebugStringA("begin 1========");
	for (int i = 0; i < 1800; i++)
	{
		Sleep(2);
	}
	OutputDebugStringA("end 1========");





	OutputDebugStringA("begin 2========");
	for (int i = 0; i < 1800; i++)
	{
		std::this_thread::sleep_for(std::chrono::milliseconds(2));
	}
	OutputDebugStringA("end 2========");

第一次
Sleep消耗时间: 23.96765327s

第二次
std::this_thread::sleep_for 消耗时间 : 23.88462829s

原文地址:https://www.cnblogs.com/scotth/p/7067872.html