X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a35857675df75b15725d79c3542dc56e24500e3e..305d783c9c259a5ec28836bdf697f73c6451aa2f:/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp diff --git a/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp b/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp index 65acdbd842..c4c934e2b3 100644 --- a/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp +++ b/examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -46,15 +46,15 @@ int main(int argc, char* argv[]) sg4::Engine e(&argc, argv); e.load_platform(argv[1]); - sg4::Mailbox* mb1 = sg4::Mailbox::by_name("Mailbox 1"); - sg4::Mailbox* mb2 = sg4::Mailbox::by_name("Mailbox 2"); + sg4::Mailbox* mb1 = e.mailbox_by_name_or_create("Mailbox 1"); + sg4::Mailbox* mb2 = e.mailbox_by_name_or_create("Mailbox 2"); - sg4::Actor::create("pinger", sg4::Host::by_name("Tremblay"), pinger, mb1, mb2); - sg4::Actor::create("ponger", sg4::Host::by_name("Jupiter"), ponger, mb2, mb1); + sg4::Actor::create("pinger", e.host_by_name("Tremblay"), pinger, mb1, mb2); + sg4::Actor::create("ponger", e.host_by_name("Jupiter"), ponger, mb2, mb1); e.run(); - XBT_INFO("Total simulation time: %.3f", e.get_clock()); + XBT_INFO("Total simulation time: %.3f", sg4::Engine::get_clock()); return 0; }