6#ifndef WAITER_HPP_INCLUDE
7#define WAITER_HPP_INCLUDE
10#include "geopm_time.h"
11#include "geopm_public.h"
26 std::string strategy);
36 virtual void wait(
void) = 0;
39 virtual double period(
void)
const = 0;
49 void reset(
void)
override;
51 void wait(
void)
override;
52 double period(
void)
const override;
55 geopm_time_s m_time_target;
void wait(void) override
Wait until the period has elapsed since last call to reset() or wait().
Definition Waiter.cpp:54
virtual ~SleepWaiter()=default
SleepWaiter(double period)
Definition Waiter.cpp:34
double period(void) const override
Get the period for the waiter.
Definition Waiter.cpp:73
void reset(void) override
Reset the timer for next wait.
Definition Waiter.cpp:42
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.
static std::unique_ptr< Waiter > make_unique(double period)
Create a Waiter with "sleep" strategy.
Definition Waiter.cpp:17
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