1 /* Copyright (c) 2008-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/kernel/actor/ActorImpl.hpp"
13 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)");
15 namespace simgrid::mc {
17 std::vector<double> processes_time;
21 double MC_process_clock_get(const simgrid::kernel::actor::ActorImpl* process)
24 auto pid = static_cast<size_t>(process->get_pid());
25 if (pid < simgrid::mc::processes_time.size())
26 return simgrid::mc::processes_time[pid];
31 void MC_process_clock_add(const simgrid::kernel::actor::ActorImpl* process, double amount)
33 simgrid::mc::processes_time.at(process->get_pid()) += amount;