Add win32 implementation of nanosleep

This commit is contained in:
Danny Robson 2012-05-08 15:02:25 +10:00
parent 5ef9f02a19
commit 3e014f366e

View File

@ -37,6 +37,14 @@ util::nanoseconds (void) {
return ((double)count.QuadPart / freq.QuadPart) * 1000000000UL;
}
void
util::sleep (uint64_t ns) {
static const uint64_t ns_in_ms = 1000000;
Sleep (ns / ns_in_ms);
}
#else
#include <ctime>