X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/360d1e6510190d279551d9ca0510badccb1f8b37..e9a86ac48ea8d06ddebe18744c40548a9f65956f:/examples/s4u/exec-async/s4u-exec-async.cpp diff --git a/examples/s4u/exec-async/s4u-exec-async.cpp b/examples/s4u/exec-async/s4u-exec-async.cpp index 1b75fc98f8..6794d5b25e 100644 --- a/examples/s4u/exec-async/s4u-exec-async.cpp +++ b/examples/s4u/exec-async/s4u-exec-async.cpp @@ -1,11 +1,9 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. 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. */ #include "simgrid/s4u.hpp" -#include "simgrid/forward.h" -#include "simgrid/s4u/forward.hpp" XBT_LOG_NEW_DEFAULT_CATEGORY(s4u_test, "Messages specific for this s4u example"); @@ -13,7 +11,7 @@ static void test(double computation_amount, double priority) { XBT_INFO("Hello! Execute %g flops with priority %g", computation_amount, priority); simgrid::s4u::ExecPtr activity = simgrid::s4u::this_actor::exec_init(computation_amount); - activity->setPriority(priority); + activity->set_priority(priority); activity->start(); activity->wait(); @@ -23,13 +21,13 @@ static void test(double computation_amount, double priority) int main(int argc, char* argv[]) { simgrid::s4u::Engine e(&argc, argv); - e.loadPlatform(argv[1]); - simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 1.0); - simgrid::s4u::Actor::createActor("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 2.0); + e.load_platform(argv[1]); + simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 1.0); + simgrid::s4u::Actor::create("test", simgrid::s4u::Host::by_name("Fafard"), test, 7.6296e+07, 2.0); e.run(); - XBT_INFO("Simulation time %g", e.getClock()); + XBT_INFO("Simulation time %g", e.get_clock()); return 0; }