geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
Class to support a periodic wait loop. More...
#include <Waiter.hpp>
Public Member Functions | |
Waiter ()=default | |
virtual | ~Waiter ()=default |
virtual void | reset (void)=0 |
Reset the timer for next wait. More... | |
virtual void | reset (double period)=0 |
Reset the timer for next wait and set period. More... | |
virtual void | wait (void)=0 |
Wait until the period has elapsed since last call to reset() or wait() More... | |
virtual double | period (void) const =0 |
Get the period for the waiter. More... | |
Static Public Member Functions | |
static std::unique_ptr< Waiter > | make_unique (double period) |
Create a Waiter with "sleep" strategy. More... | |
static std::unique_ptr< Waiter > | make_unique (double period, std::string strategy) |
Create a Waiter. More... | |
Class to support a periodic wait loop.
|
default |
|
virtualdefault |
|
static |
Create a Waiter with "sleep" strategy.
[in] | period | Duration in seconds to wait |
|
static |
Create a Waiter.
[in] | period | Duration in seconds to wait |
[in] | strategy | Wait algorithm ("sleep") |
|
pure virtual |
|
pure virtual |
Reset the timer for next wait and set period.
[in] | period | Duration in seconds to wait |
Implemented in geopm::SleepWaiter.
|
pure virtual |
Reset the timer for next wait.
Implemented in geopm::SleepWaiter.
|
pure virtual |
Wait until the period has elapsed since last call to reset() or wait()
Implemented in geopm::SleepWaiter.