Replace Sleep() by std:🧵:sleep_for()
This commit is contained in:
parent
60baf6d05f
commit
b79ff124e6
24 changed files with 80 additions and 232 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue