- while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) {
-
- CpuAction* action = static_cast<CpuAction*>(actionHeapPop());
- XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
- if (TRACE_is_enabled()) {
- Cpu* cpu = static_cast<Cpu*>(action->get_variable()->get_constraint(0)->get_id());
- TRACE_surf_host_set_utilization(cpu->getCname(), action->get_category(), action->get_variable()->get_value(),
- action->get_last_update(), now - action->get_last_update());
- }
+ while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) {
+ auto* action = static_cast<CpuAction*>(get_action_heap().pop());
+ XBT_DEBUG("Something happened to action %p", action);