Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into actor-priority
[simgrid.git] / include / simgrid / s4u / Activity.hpp
index 67fcbd5..4568e52 100644 (file)
@@ -9,7 +9,7 @@
 #include <simgrid/s4u/forward.hpp>
 #include <simgrid/forward.h>
 
-typedef enum { inited = 0, started, canceled, errored, finished } e_s4u_activity_state_t;
+enum e_s4u_activity_state_t { inited = 0, started, canceled, errored, finished };
 
 namespace simgrid {
 namespace s4u {
@@ -49,11 +49,11 @@ public:
   e_s4u_activity_state_t getState() {return state_;}
 
   /** Get the remaining amount of work that this Activity entails. When it's 0, it's done. */
-  size_t getRemains();
+  double getRemains();
   /** Set the [remaining] amount of work that this Activity will entail
    *
    * It is forbidden to change the amount of work once the Activity is started */
-  void setRemains(size_t remains);
+  void setRemains(double remains);
 
   /** Put some user data onto the Activity */
   void setUserData(void *data) {userData_=data;}
@@ -63,7 +63,7 @@ public:
 private:
   simgrid::kernel::activity::ActivityImplPtr pimpl_ = nullptr;
   e_s4u_activity_state_t state_ = inited;
-  size_t remains_                                   = 0;
+  double remains_ = 0;
   void *userData_ = nullptr;
 }; // class