Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill a couple more of the long descriptions in instr
[simgrid.git] / src / s4u / s4u_Activity.cpp
1 /* Copyright (c) 2006-2018. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "xbt/asserts.h"
8 #include "xbt/log.h"
9
10 #include "simgrid/s4u/Activity.hpp"
11
12 XBT_LOG_EXTERNAL_CATEGORY(s4u);
13 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_activity, s4u, "S4U activities");
14
15 namespace simgrid {
16 namespace s4u {
17
18 double Activity::get_remaining()
19 {
20   return remains_;
21 }
22
23 Activity* Activity::set_remaining(double remains)
24 {
25   xbt_assert(state_ == State::inited, "Cannot change the remaining amount of work once the Activity is started");
26   remains_ = remains;
27   return this;
28 }
29
30 } // namespace s4u
31 } // namespace simgrid