Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Separate ConditionVariableImpl into its own files
[simgrid.git] / src / s4u / s4u_activity.cpp
index 4e8caaa..01a6aad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2015. The SimGrid Team.
+/* Copyright (c) 2006-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -15,16 +15,16 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(s4u_activity,s4u,"S4U activities");
 namespace simgrid {
 namespace s4u {
 
-Activity::Activity() {
-
-}
-Activity::~Activity() {
-
+double Activity::get_remaining()
+{
+  return remains_;
 }
 
-void Activity::setRemains(double remains) {
-  xbt_assert(state_ == inited, "Cannot change the remaining amount of work once the Activity is started");
+Activity* Activity::set_remaining(double remains)
+{
+  xbt_assert(state_ == State::inited, "Cannot change the remaining amount of work once the Activity is started");
   remains_ = remains;
+  return this;
 }
 
 }