This commit is contained in:
Andrew Gundersen 2021-08-13 14:55:14 -05:00
commit d32989cc81
135 changed files with 17183 additions and 669 deletions

19
node_modules/sleep/sleep_win.cc generated vendored Normal file
View 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