blob: 99231e726cd473d79e61df225ddd5f8cdc44e8c5 [file] [log] [blame] [raw]
#include <windows.h>
#include <nt.h>
//#include <errno.h>
int usleep(unsigned long int useconds) {
LARGE_INTEGER interval;
interval.QuadPart = -(unsigned long long int)useconds * 10;
long int status = NtDelayExecution(1, &interval);
//return ntstatus_to_errno(status) ? 0 : -1;
return status < 0 ? 0 : -1;
}
unsigned int sleep(unsigned int seconds) {
usleep(seconds * 1000000);
return 0;
}