Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar smells.
[simgrid.git] / teshsuite / s4u / concurrent_rw / concurrent_rw.cpp
index 9eead5b..ba81b74 100644 (file)
@@ -14,15 +14,15 @@ static void host()
   XBT_INFO("process %ld is writing!", id);
   disk->write(4000000);
   XBT_INFO("process %ld goes to sleep for %ld seconds", id, id);
-  simgrid::s4u::this_actor::sleep_for(id);
+  simgrid::s4u::this_actor::sleep_for(static_cast<double>(id));
   XBT_INFO("process %ld is writing again!", id);
   disk->write(4000000);
   XBT_INFO("process %ld goes to sleep for %ld seconds", id, 6 - id);
-  simgrid::s4u::this_actor::sleep_for(6 - id);
+  simgrid::s4u::this_actor::sleep_for(static_cast<double>(6 - id));
   XBT_INFO("process %ld is reading!", id);
   disk->read(4000000);
   XBT_INFO("process %ld goes to sleep for %ld seconds", id, id);
-  simgrid::s4u::this_actor::sleep_for(id);
+  simgrid::s4u::this_actor::sleep_for(static_cast<double>(id));
   XBT_INFO("process %ld is reading again!", id);
   disk->read(4000000);
 }