WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
SleepAction.h
1 
10 #ifndef WRENCH_SLEEP_ACTION_H
11 #define WRENCH_SLEEP_ACTION_H
12 
13 #include <string>
14 
15 #include "wrench/action/Action.h"
16 
17 namespace wrench {
18 
22  class SleepAction : public Action {
23 
24  public:
25  double getSleepTime();
26 
27  protected:
28  friend class CompoundJob;
29 
30  SleepAction(const std::string& name, std::shared_ptr<CompoundJob> job, double sleep_time);
31 
32  void execute(std::shared_ptr<ActionExecutor> action_executor) override;
33  void terminate(std::shared_ptr<ActionExecutor> action_executor) override;
34 
35 
36  private:
37  double sleep_time;
38 
39  };
40 }
41 
42 #endif //WRENCH_SLEEP_ACTION_H
wrench::SleepAction::SleepAction
SleepAction(const std::string &name, std::shared_ptr< CompoundJob > job, double sleep_time)
Constructor.
Definition: SleepAction.cpp:25
wrench::SleepAction
A class that implements a sleep action.
Definition: SleepAction.h:22
wrench::SleepAction::getSleepTime
double getSleepTime()
Returns the action's sleep time.
Definition: SleepAction.cpp:33
wrench
Definition: Action.cpp:28
wrench::SleepAction::terminate
void terminate(std::shared_ptr< ActionExecutor > action_executor) override
Method called when the action terminates.
Definition: SleepAction.cpp:52
wrench::Action
An abstract class that implements the concept of an action.
Definition: Action.h:28
wrench::SleepAction::execute
void execute(std::shared_ptr< ActionExecutor > action_executor) override
Method to execute the action.
Definition: SleepAction.cpp:41
wrench::CompoundJob
A compound job.
Definition: CompoundJob.h:47