Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case s4u::Mailbox
[simgrid.git] / examples / s4u / app-chainsend / s4u-app-chainsend.cpp
index 0a81c22..79785f5 100644 (file)
@@ -42,7 +42,7 @@ public:
   unsigned int received_pieces      = 0;
   unsigned int total_pieces         = 0;
 
-  Peer() { me = simgrid::s4u::Mailbox::byName(simgrid::s4u::Host::current()->get_cname()); }
+  Peer() { me = simgrid::s4u::Mailbox::by_name(simgrid::s4u::Host::current()->get_cname()); }
   ~Peer()     = default;
 
   void joinChain()
@@ -146,7 +146,7 @@ public:
     for (int i = 1; i <= hostcount; i++) {
       std::string name = std::string("node-") + std::to_string(i) + ".acme.org";
       XBT_DEBUG("%s", name.c_str());
-      mailboxes.push_back(simgrid::s4u::Mailbox::byName(name));
+      mailboxes.push_back(simgrid::s4u::Mailbox::by_name(name));
     }
   }
 
@@ -159,12 +159,12 @@ static void peer()
 
   Peer* p = new Peer();
 
-  double start_time = simgrid::s4u::Engine::getClock();
+  double start_time = simgrid::s4u::Engine::get_clock();
   p->joinChain();
   p->forwardFile();
 
   simgrid::s4u::Comm::wait_all(&p->pending_sends);
-  double end_time = simgrid::s4u::Engine::getClock();
+  double end_time = simgrid::s4u::Engine::get_clock();
 
   XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", end_time - start_time, p->received_bytes,
            p->received_bytes / 1024.0 / 1024.0 / (end_time - start_time));
@@ -201,7 +201,7 @@ int main(int argc, char* argv[])
   simgrid::s4u::Actor::create("peer", simgrid::s4u::Host::by_name("node-8.acme.org"), peer);
 
   e.run();
-  XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::getClock());
+  XBT_INFO("Total simulation time: %e", simgrid::s4u::Engine::get_clock());
 
   return 0;
 }