Init. Map does not function and only working on backend at the moment.
This commit is contained in:
19
node_modules/sleep/sleep_win.cc
generated
vendored
Normal file
19
node_modules/sleep/sleep_win.cc
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
#include "sleep.h"
|
||||
|
||||
#if ( defined _WIN32 || defined _WIN64 ) && ( !NAN_HAS_CPLUSPLUS_11 )
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
void node_usleep(uint32_t usec) {
|
||||
LARGE_INTEGER li;
|
||||
li.QuadPart = -10LL * usec; // negative values for relative time
|
||||
|
||||
HANDLE timer = CreateWaitableTimer(NULL, TRUE, NULL);
|
||||
if(!timer) return;
|
||||
|
||||
SetWaitableTimer(timer, &li, 0, NULL, NULL, 0);
|
||||
WaitForSingleObject(timer, INFINITE);
|
||||
CloseHandle(timer);
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user