-/* Copyright (c) 2013-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2022. 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. */
#include "src/kernel/resource/profile/Event.hpp"
#include "src/kernel/resource/profile/Profile.hpp"
#include "src/surf/surf_interface.hpp"
-#include "surf/surf.hpp"
#include <algorithm>
#include <memory>
XBT_DEBUG("Action %p: finish", action);
action->finish(Action::State::FINISHED);
/* update remaining amount of all actions */
- action->cpu_->update_remaining_amount(surf_get_clock());
+ action->cpu_->update_remaining_amount(EngineImpl::get_clock());
}
}
XBT_DEBUG("Speed changed in trace! New fixed value: %f", value);
/* update remaining of actions and put in modified cpu list */
- update_remaining_amount(surf_get_clock());
+ update_remaining_amount(EngineImpl::get_clock());
set_modified(true);
speed_.scale = value;
tmgr_trace_event_unref(&speed_.event);
- } else if (event == state_event_) {
+ } else if (event == get_state_event()) {
if (value > 0) {
if (not is_on()) {
XBT_VERB("Restart actors on host %s", get_iface()->get_cname());
}
} else {
get_iface()->turn_off();
- double date = surf_get_clock();
+ double date = EngineImpl::get_clock();
/* put all action running on cpu to failed */
for (CpuTiAction& action : action_set_) {
}
}
}
- tmgr_trace_event_unref(&state_event_);
+ unref_state_event();
} else {
xbt_die("Unknown event!\n");
double CpuTi::get_speed_ratio()
{
- speed_.scale = speed_integrated_trace_->get_power_scale(surf_get_clock());
+ speed_.scale = speed_integrated_trace_->get_power_scale(EngineImpl::get_clock());
return CpuImpl::get_speed_ratio();
}
double CpuTiAction::get_remains()
{
XBT_IN("(%p)", this);
- cpu_->update_remaining_amount(surf_get_clock());
+ cpu_->update_remaining_amount(EngineImpl::get_clock());
XBT_OUT();
return get_remains_no_update();
}