* under the terms of the license (GNU LGPL) which comes with this package. */
#include "cpu_ti.hpp"
+#include "src/kernel/resource/profile/trace_mgr.hpp"
#include "src/surf/surf_interface.hpp"
-#include "src/surf/trace_mgr.hpp"
#include "surf/surf.hpp"
#define EPSILON 0.000000001
/* add a fake trace event if periodicity == 0 */
if (profile && profile->event_list.size() > 1) {
kernel::profile::DatedValue val = profile->event_list.back();
- if (val.date_ < 1e-12)
- speed_.event = future_evt_set.add_trace(new simgrid::kernel::profile::Profile(), this);
+ if (val.date_ < 1e-12) {
+ simgrid::kernel::profile::Profile* prof = new simgrid::kernel::profile::Profile();
+ speed_.event = prof->schedule(&future_evt_set, this);
+ }
}
}
} else if (event == state_event_) {
if (value > 0) {
- if (is_off()) {
+ if (not is_on()) {
XBT_VERB("Restart processes on host %s", get_host()->get_cname());
get_host()->turn_on();
}
* Action *
**********/
-CpuTiAction::CpuTiAction(CpuTi* cpu, double cost) : CpuAction(cpu->get_model(), cost, cpu->is_off()), cpu_(cpu)
+CpuTiAction::CpuTiAction(CpuTi* cpu, double cost) : CpuAction(cpu->get_model(), cost, not cpu->is_on()), cpu_(cpu)
{
cpu_->set_modified(true);
}