diff --git a/vm/os-windows-nt.cpp b/vm/os-windows-nt.cpp index c46628d41e..796834a9c4 100755 --- a/vm/os-windows-nt.cpp +++ b/vm/os-windows-nt.cpp @@ -51,6 +51,11 @@ u64 nano_count() return count.QuadPart*(1000000000/frequency.QuadPart); } +void sleep_nanos(u64 nsec) +{ + Sleep((DWORD)(nsec/1000000)); +} + LONG factor_vm::exception_handler(PEXCEPTION_POINTERS pe) { PEXCEPTION_RECORD e = (PEXCEPTION_RECORD)pe->ExceptionRecord; diff --git a/vm/os-windows.cpp b/vm/os-windows.cpp index 8a7cf9024b..78426b19ca 100755 --- a/vm/os-windows.cpp +++ b/vm/os-windows.cpp @@ -126,11 +126,6 @@ segment::~segment() fatal_error("Segment deallocation failed",0); } -void sleep_nanos(u64 nsec) -{ - Sleep((DWORD)(nsec/1000000)); -} - long getpagesize() { static long g_pagesize = 0; diff --git a/vm/os-windows.hpp b/vm/os-windows.hpp index 37591a529f..eeac2a42dd 100644 --- a/vm/os-windows.hpp +++ b/vm/os-windows.hpp @@ -45,6 +45,7 @@ inline static void early_init() {} u64 system_micros(); u64 nano_count(); +void sleep_nanos(u64 nsec); long getpagesize(); } diff --git a/vm/run.cpp b/vm/run.cpp index ebe3678439..1bb2e0c44e 100755 --- a/vm/run.cpp +++ b/vm/run.cpp @@ -20,7 +20,7 @@ void factor_vm::primitive_nano_count() void factor_vm::primitive_sleep() { - sleep_nanos(factor_vm::to_unsigned_8(dpop())); + sleep_nanos(to_unsigned_8(dpop())); } } diff --git a/vm/vm.hpp b/vm/vm.hpp index 04eaf3d2ef..4f82e59598 100755 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -674,7 +674,6 @@ struct factor_vm // os-windows #if defined(WINDOWS) - void sleep_nanos(u64 nsec); const vm_char *vm_executable_path(); const vm_char *default_image_path(); void windows_image_path(vm_char *full_path, vm_char *temp_path, unsigned int length);