Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
All of the examples use now the StringHelp class to simplify the string manipulation.
[simgrid.git] / examples / cxx / suspend / LazyGuy.cxx
index ba12220..7db90b7 100644 (file)
@@ -1,21 +1,21 @@
 #include "LazyGuy.hpp"\r
 #include <Host.hpp>\r
 \r
-#include <iostream>\r
-using namespace std;\r
+#include <Msg.hpp>\r
 \r
 MSG_IMPLEMENT_DYNAMIC(LazyGuy, Process);\r
 \r
 int LazyGuy::main(int argc, char** argv)\r
 {\r
-       cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Hello !" << endl;\r
+       info("Hello !");\r
        \r
-       cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Nobody's watching me ? Let's go to sleep." << endl;\r
+       info("Nobody's watching me ? Let's go to sleep.");\r
        \r
        Process::currentProcess().suspend();\r
        \r
-       cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Uuuh ? Did somebody call me ?" << endl;\r
-       cout <<"[" << getName() << ":" << getHost().getName() << "] " << "Mmmh, goodbye now." << endl; \r
+       info("Uuuh ? Did somebody call me ?");\r
+       \r
+       info("Mmmh, goodbye now."); \r
 \r
 \r
        delete this;\r