Replace Sleep() by std:🧵:sleep_for()

This commit is contained in:
Térence Clastres 2020-06-20 15:50:07 +02:00 committed by Adam Honse
parent 60baf6d05f
commit b79ff124e6
24 changed files with 80 additions and 232 deletions

View file

@ -6,16 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
#include <Windows.h>
#else
#include <unistd.h>
static void Sleep(unsigned int milliseconds)
{
usleep(1000 * milliseconds);
}
#endif
using namespace std::chrono_literals;
/******************************************************************************************\
* *
@ -50,7 +41,7 @@ bool TestForCorsairVengeanceProController(i2c_smbus_interface* bus, unsigned cha
}
}
Sleep(10);
std::this_thread::sleep_for(10ms);
return(pass);