A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework SleepImpl (and save a cast)
[simgrid.git]
/
src
/
kernel
/
activity
/
SleepImpl.hpp
diff --git
a/src/kernel/activity/SleepImpl.hpp
b/src/kernel/activity/SleepImpl.hpp
index
32e6820
..
30a004c
100644
(file)
--- a/
src/kernel/activity/SleepImpl.hpp
+++ b/
src/kernel/activity/SleepImpl.hpp
@@
-14,18
+14,19
@@
namespace kernel {
namespace activity {
class XBT_PUBLIC SleepImpl : public ActivityImpl {
namespace activity {
class XBT_PUBLIC SleepImpl : public ActivityImpl {
- ~SleepImpl() override;
+ sg_host_t host_ = nullptr;
+ double duration_ = 0;
public:
public:
- explicit SleepImpl(const std::string& name, s4u::Host* host) : ActivityImpl(name), host_(host) {}
+ SleepImplPtr set_name(const std::string& name);
+ SleepImplPtr set_host(s4u::Host* host);
+ SleepImplPtr set_duration(double duration);
void post() override;
void finish() override;
void post() override;
void finish() override;
- SleepImpl* start(double duration);
-
- sg_host_t host_ = nullptr;
+ SleepImpl* start();
};
};
-}
-}
-} // namespace simgrid
::kernel::activity
+}
// namespace activity
+}
// namespace kernel
+} // namespace simgrid
#endif
#endif