#ifndef BASE_POWER_MONITOR_TIMER_SAMPLING_EVENT_SOURCE_H_
#define BASE_POWER_MONITOR_TIMER_SAMPLING_EVENT_SOURCE_H_
#include "base/base_export.h"
#include "base/power_monitor/sampling_event_source.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
namespace base {
class BASE_EXPORT TimerSamplingEventSource : public SamplingEventSource {
public:
explicit TimerSamplingEventSource(TimeDelta interval);
~TimerSamplingEventSource() override;
bool Start(SamplingEventCallback callback) override;
TimeDelta GetSampleInterval() override;
private:
const TimeDelta interval_;
RepeatingTimer timer_;
};
}
#endif