Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
d4f83e0d1f96188c66849bc1b2ff3971773be023
[simgrid.git] / src / kernel / activity / SleepImpl.hpp
1 /* Copyright (c) 2007-2019. 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 SIMIX_SYNCHRO_SLEEP_HPP
7 #define SIMIX_SYNCHRO_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 {
17 public:
18   explicit SleepImpl(const std::string& name, s4u::Host* host) : ActivityImpl(name), host_(host) {}
19   void post() override;
20   void finish() override;
21   SleepImpl* start(double duration);
22
23   sg_host_t host_ = nullptr;
24 };
25 } // namespace activity
26 } // namespace kernel
27 } // namespace simgrid
28
29 #endif