diff --git a/test/addons/async-hello-world/binding.cc b/test/addons/async-hello-world/binding.cc index b087bf9aa0..e6033fc4fd 100644 --- a/test/addons/async-hello-world/binding.cc +++ b/test/addons/async-hello-world/binding.cc @@ -1,8 +1,14 @@ -#include #include #include #include +#if defined _WIN32 +#include +#else +#include +#endif + + struct async_req { uv_work_t req; int input; @@ -13,7 +19,12 @@ struct async_req { void DoAsync(uv_work_t* r) { async_req* req = reinterpret_cast(r->data); - sleep(1); // Simulate CPU intensive process... + // Simulate CPU intensive process... +#if defined _WIN32 + Sleep(1000); +#else + sleep(1); +#endif req->output = req->input * 2; }