geopm
3.1.1.dev296+g5916b956
GEOPM - Global Extensible Open Power Manager
|
Class to support a periodic wait loop based on clock_nanosleep() using CLOCK_REALTIME. More...
#include <Waiter.hpp>
Public Member Functions | |
SleepWaiter (double period) | |
virtual | ~SleepWaiter ()=default |
void | reset (void) override |
Reset the timer for next wait. More... | |
void | reset (double period) override |
Reset the timer for next wait and set period. More... | |
void | wait (void) override |
Wait until the period has elapsed since last call to reset() or wait() More... | |
double | period (void) const override |
Get the period for the waiter. More... | |
Public Member Functions inherited from geopm::Waiter | |
Waiter ()=default | |
virtual | ~Waiter ()=default |
Additional Inherited Members | |
Static Public Member Functions inherited from geopm::Waiter | |
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 based on clock_nanosleep() using CLOCK_REALTIME.
geopm::SleepWaiter::SleepWaiter | ( | double | period | ) |
|
virtualdefault |
|
overridevirtual |
|
overridevirtual |
Reset the timer for next wait and set period.
[in] | period | Duration in seconds to wait |
Implements geopm::Waiter.
|
overridevirtual |
Reset the timer for next wait.
Implements geopm::Waiter.
|
overridevirtual |
Wait until the period has elapsed since last call to reset() or wait()
Implements geopm::Waiter.