Salome HOME
*** empty log message ***
[samples/component.git] / src / SubComponent / SubComponent.cxx
index 76ed6e197f375139438bcaa1490d30ffdc90b235..7b35c6dbdd533ee5f8b540ca0e39f4a21fec6fb1 100644 (file)
@@ -63,8 +63,11 @@ void SubComponentEngine::Sub( double x , double y , double & z ) {
   int S;
   
   sendMessage(NOTIF_STEP, "Sub is Computing");
-  S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
-  sleep(S);
+//  S = 1+(int) (15.0*rand()/(RAND_MAX+1.0));
+  S = 5 ;
+  while ( S ) {
+    S = sleep(S);
+  }
   MESSAGE( "SubComponentEngine::Sub( " <<  x << " , " << y << " , " << z
        << " ) after " << S << " seconds" )
   endService( " SubComponentEngine::Sub"  );