Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sanitize surf API: s/updateState/apply_event/
[simgrid.git] / src / surf / cpu_cas01.cpp
index 08a68e8..e05b75e 100644 (file)
@@ -100,10 +100,9 @@ Cpu *CpuCas01Model::createCpu(simgrid::s4u::Host *host, xbt_dynar_t speedPeak,
   return cpu;
 }
 
-double CpuCas01Model::shareResourcesFull(double /*now*/)
+double CpuCas01Model::next_occuring_event_full(double /*now*/)
 {
-  return Model::shareResourcesMaxMin(getRunningActionSet(),
-                             p_maxminSystem, lmm_solve);
+  return Model::shareResourcesMaxMin(getRunningActionSet(), p_maxminSystem, lmm_solve);
 }
 
 void CpuCas01Model::addTraces()
@@ -183,7 +182,7 @@ void CpuCas01::onSpeedChange() {
   Cpu::onSpeedChange();
 }
 
-void CpuCas01::updateState(tmgr_trace_iterator_t event_type, double value, double date)
+void CpuCas01::apply_event(tmgr_trace_iterator_t event_type, double value)
 {
   lmm_variable_t var = NULL;
   lmm_element_t elem = NULL;
@@ -206,6 +205,7 @@ void CpuCas01::updateState(tmgr_trace_iterator_t event_type, double value, doubl
       turnOn();
     } else {
       lmm_constraint_t cnst = getConstraint();
+      double date = surf_get_clock();
 
       turnOff();