Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / kernel / activity / SleepImpl.hpp
1 /* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_KERNEL_ACTIVITY_SLEEP_HPP
7 #define SIMGRID_KERNEL_ACTIVITY_SLEEP_HPP
8
9 #include "src/kernel/activity/ActivityImpl.hpp"
10 #include "surf/surf.hpp"
11
12 namespace simgrid {
13 namespace kernel {
14 namespace activity {
15
16 class XBT_PUBLIC SleepImpl : public ActivityImpl_T<SleepImpl> {
17   sg_host_t host_  = nullptr;
18   double duration_ = 0;
19
20 public:
21   SleepImpl& set_host(s4u::Host* host);
22   SleepImpl& set_duration(double duration);
23   void post() override;
24   void finish() override;
25   SleepImpl* start();
26 };
27 } // namespace activity
28 } // namespace kernel
29 } // namespace simgrid
30
31 #endif