Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Deprecate SIMIX_get_clock().
[simgrid.git] / src / instr / instr_paje_containers.cpp
index ce91863..f97d975 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2021. 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. */
@@ -14,13 +14,7 @@ namespace simgrid {
 namespace instr {
 
 Container* Container::root_container_ = nullptr;              /* the root container */
-std::map<std::string, Container*> Container::all_containers_; /* all created containers indexed by name */
-
-long long int new_paje_id()
-{
-  static long long int type_id = 0;
-  return type_id++;
-}
+std::map<std::string, Container*, std::less<>> Container::all_containers_; /* all created containers indexed by name */
 
 NetZoneContainer::NetZoneContainer(const std::string& name, unsigned int level, NetZoneContainer* father)
     : Container::Container(name, "", father)
@@ -87,7 +81,7 @@ Container::~Container()
   all_containers_.erase(name_);
 
   // obligation to dump previous events because they might reference the container that is about to be destroyed
-  last_timestamp_to_dump = SIMIX_get_clock();
+  last_timestamp_to_dump = simgrid_get_clock();
   dump_buffer(true);
 
   on_destruction(*this);
@@ -139,7 +133,6 @@ VariableType* Container::get_variable(const std::string& name)
 EntityValue::EntityValue(const std::string& name, const std::string& color, Type* father)
     : name_(name), color_(color), father_(father)
 {
-  id_ = simgrid::instr::new_paje_id();
   on_creation(*this);
 }