Salome HOME
bos #37326: fix compilation issue on Windows - replacing usleep with sleep_for &...
[modules/yacs.git] / src / runtime / Test / TestRuntime.cxx
index bf813ba89f5ac8e5bed61a8bd1e7e7edb360570a..d49cc8b37ef43d4b74f129b997bad7878785ca2e 100644 (file)
@@ -33,6 +33,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION( RuntimeTest );
 // --- generic Main program from bases/Test
 #include "BasicMainTestInternal.hxx"
 #include "RuntimeSALOME.hxx"
+#include <chrono>
+#include <thread>
 
 int main()
 {
@@ -44,7 +46,7 @@ int main()
   CORBA::ORB_ptr orb = rt->getOrb();
   CORBA::String_var ior = orb->object_to_string( ns );
   AutoPyRef proc = rt->launchSubProcess({"./runtimeTestEchoSrv",std::string(ior)});
-  usleep(3000000);
+  std::this_thread::sleep_for(std::chrono::microseconds(3000000));
   int ret = BasicMainTestInternal();
   //
   {