1 // http://stackoverflow.com/questions/5801813/c-usleep-is-obsolete-workarounds-for-windows-mingw
5 void usleep(__int64 usec
)
10 ft
.QuadPart
= -(10*usec
); // Convert to 100 nanosecond interval, negative value indicates relative time
12 timer
= CreateWaitableTimer(NULL
, TRUE
, NULL
);
13 SetWaitableTimer(timer
, &ft
, 0, NULL
, NULL
, 0);
14 WaitForSingleObject(timer
, INFINITE
);