X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/665b37c47175d0abd08d1252180d4d37bf9a342a..12ad1e7c01058fada33cecf2d4c4cb8bf9874f9e:/src/s4u/s4u_activity.cpp diff --git a/src/s4u/s4u_activity.cpp b/src/s4u/s4u_activity.cpp index 4568abb6c3..d2cc31b58f 100644 --- a/src/s4u/s4u_activity.cpp +++ b/src/s4u/s4u_activity.cpp @@ -4,8 +4,8 @@ /* 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 "xbt/asserts.h" #include "xbt/log.h" -#include "src/msg/msg_private.h" #include "simgrid/s4u/Activity.hpp" @@ -15,16 +15,16 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_activity,s4u,"S4U activities"); namespace simgrid { namespace s4u { -Activity::Activity() { - -} -Activity::~Activity() { - +double Activity::getRemains() +{ + return remains_; } -void Activity::setRemains(double remains) { +Activity* Activity::setRemains(double remains) +{ xbt_assert(state_ == inited, "Cannot change the remaining amount of work once the Activity is started"); remains_ = remains; + return this; } }