- xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth trace to Link %s", get_cname());
- bandwidth_.event = future_evt_set.add_trace(trace, this);
+ xbt_assert(bandwidth_.event == nullptr, "Cannot set a second bandwidth profile to Link %s", get_cname());
+ bandwidth_.event = profile->schedule(&future_evt_set, this);