]> AND Public Git Repository - simgrid.git/blobdiff - src/surf/cpu_interface.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
normalize the handling of speed traces in CpuTi
[simgrid.git] / src / surf / cpu_interface.cpp
index 5b31783685d729c418d041cfc11ff6027a28d8aa..475e236447e8c0c5e8d192d154b3c165cf6d741e 100644 (file)
@@ -245,6 +245,20 @@ int Cpu::getCore()
   return m_core;
 }
 
+void Cpu::set_state_trace(tmgr_trace_t trace)
+{
+  xbt_assert(p_stateEvent==NULL,"Cannot set a second state trace to Host %s", m_host->name().c_str());
+
+  p_stateEvent = future_evt_set->add_trace(trace, 0.0, this);
+}
+void Cpu::set_speed_trace(tmgr_trace_t trace)
+{
+  xbt_assert(p_speedEvent==NULL,"Cannot set a second speed trace to Host %s", m_host->name().c_str());
+
+  p_speedEvent = future_evt_set->add_trace(trace, 0.0, this);
+}
+
+
 /**********
  * Action *
  **********/