]> SALOME platform Git repositories - samples/component.git/blobdiff - src/MulComponent/MulComponent.cxx
Salome HOME
Porting SALOME COMPONENT module to win32 platform.
[samples/component.git] / src / MulComponent / MulComponent.cxx
index a5a71a0a3d064da61d48d3945bff1183778a79db..620ff74fd84a8f2159f37db9db84c7115b94c4d2 100644 (file)
@@ -26,7 +26,9 @@
 //  Module : SuperVisionTest
 //
 #include <stdio.h>
+#ifndef WIN32
 #include <unistd.h>
+#endif
 #include <fstream>
 #include <sstream>
 #include <string>
@@ -76,9 +78,13 @@ void MulComponentEngine::Mul( double x , double y , double & z ) {
   sendMessage(NOTIF_STEP, "Mul is Computing");
 //  S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
   S = 5 ;
+ #ifndef WIN32
   while ( S ) {
-    S = sleep(S);
+    S = sleep( S ) ;
   }
+#else
+  Sleep(S*1000);
+#endif
   MESSAGE( "MulComponentEngine::Mul( " <<  x << " , " << y << " , " << z
        << " ) after " << S << " seconds" )
   endService( " MulComponentEngine::Mul"  );