6 #ifndef WAITER_HPP_INCLUDE
7 #define WAITER_HPP_INCLUDE
10 #include "geopm_time.h"
11 #include "geopm_public.h"
21 static std::unique_ptr<Waiter> make_unique(
double period);
25 static std::unique_ptr<Waiter> make_unique(
double period,
26 std::string strategy);
33 virtual void reset(
double period) = 0;
36 virtual void wait(
void) = 0;
39 virtual double period(
void)
const = 0;
49 void reset(
void)
override;
50 void reset(
double period)
override;
51 void wait(
void)
override;
52 double period(
void)
const override;
55 geopm_time_s m_time_target;
Class to support a periodic wait loop based on clock_nanosleep() using CLOCK_REALTIME.
Definition: Waiter.hpp:45
virtual ~SleepWaiter()=default
Class to support a periodic wait loop.
Definition: Waiter.hpp:17
virtual void wait(void)=0
Wait until the period has elapsed since last call to reset() or wait()
virtual void reset(void)=0
Reset the timer for next wait.
virtual ~Waiter()=default
virtual double period(void) const =0
Get the period for the waiter.
virtual void reset(double period)=0
Reset the timer for next wait and set period.
Definition: Accumulator.cpp:12