-#include "Receiver.hpp"\r
-#include "PingPongTask.hpp"\r
-#include <Host.hpp>\r
-#include <HostNotFoundException.hpp>\r
-#include <Msg.hpp>\r
-\r
-#include <Msg.hpp>\r
-\r
-MSG_IMPLEMENT_DYNAMIC(Receiver, Process);\r
-\r
-const double commSizeLat = 1;\r
-const double commSizeBw = 100000000;\r
-\r
-int Receiver::main(int argc, char** argv)\r
-{\r
- info("Hello");\r
- double communicationTime=0;\r
- double time = getClock();\r
- StringHelper bw;\r
- \r
- info("Try to get a task");\r
- \r
- PingPongTask* task = reinterpret_cast<PingPongTask*>(Task::get(0));\r
- \r
- double timeGot = getClock();\r
- double timeSent = task->getTime();\r
- \r
- delete task;\r
- \r
- info(TEXT_("Got at time ") + TEXT_(timeGot));\r
- info(TEXT_("Was sent at time ") + TEXT_(timeSent));\r
- \r
- time = timeSent;\r
- \r
- communicationTime = timeGot - time;\r
- \r
- info(TEXT_( "Communication time : ") + TEXT_(communicationTime));\r
- \r
- info(TEXT_(" --- BW ") + bw.append(commSizeBw/communicationTime,"%07lf") + TEXT_(" ----"));\r
- \r
- info("Goodbye!");\r
- \r
- delete this;\r
-\r
- return 0;\r
-}
\ No newline at end of file
+#include "Receiver.hpp"
+#include "PingPongTask.hpp"
+#include <Host.hpp>
+#include <HostNotFoundException.hpp>
+#include <Msg.hpp>
+
+#include <Msg.hpp>
+
+MSG_IMPLEMENT_DYNAMIC(Receiver, Process)
+
+const double commSizeLat = 1;
+const double commSizeBw = 100000000;
+
+int Receiver::main(int argc, char** argv)
+{
+ info("Hello");
+ double communicationTime=0;
+ double time = getClock();
+ StringHelper bw;
+
+ info("Try to get a task");
+
+ PingPongTask* task = reinterpret_cast<PingPongTask*>(Task::get(0));
+
+ double timeGot = getClock();
+ double timeSent = task->getTime();
+
+ delete task;
+
+ info(TEXT_("Got at time ") + TEXT_(timeGot));
+ info(TEXT_("Was sent at time ") + TEXT_(timeSent));
+
+ time = timeSent;
+
+ communicationTime = timeGot - time;
+
+ info(TEXT_( "Communication time : ") + TEXT_(communicationTime));
+
+ info(TEXT_(" --- BW ") + bw.append(commSizeBw/communicationTime,"%07lf") + TEXT_(" ----"));
+
+ info("Goodbye!");
+
+ delete this;
+
+ return 0;
+}