File frequency_manager.hpp

namespace o80
class FrequencyManager
#include <frequency_manager.hpp>

class for imposing a frequency to a process

Public Functions

FrequencyManager(double frequency)

Parameters
  • frequency: frequency to impose

long int wait()

will sleep for the duration required so that the the period that passed since the last call matches the desired frequency

Private Members

Nanoseconds period_
TimePoint previous_time_
timespec req_