Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add capacity to set priorities on I/Os + example
[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
11 namespace simgrid {
12 namespace kernel {
13 namespace activity {
14
15 class XBT_PUBLIC SleepImpl : public ActivityImpl_T<SleepImpl> {
16   sg_host_t host_  = nullptr;
17   double duration_ = 0;
18
19 public:
20   SleepImpl& set_host(s4u::Host* host);
21   SleepImpl& set_duration(double duration);
22   void post() override;
23   void finish() override;
24   SleepImpl* start();
25 };
26 } // namespace activity
27 } // namespace kernel
28 } // namespace simgrid
29
30 #endif