121 Rate(
const std::string& name,
const double timeStep);
255 static void addDuration(timespec& time,
const double duration);
double getAwakeTimeMean() const
static void addDuration(timespec &time, const double duration)
unsigned int numWarnings_
Counter storing how many times a time step took longer than the warning threshold.
double getAwakeTime() const
unsigned int getNumWarnings() const
const RateOptions & getOptions() const
unsigned int getNumTimeSteps() const
double awakeTime_
Most recent time which elapsed between subsequent calls of sleep().
double getAwakeTimeStdDev() const
unsigned int numTimeSteps_
Counter storing how many times sleep has been called.
static constexpr long int N_SEC_PER_SEC
Factor storing nanoseconds per seconds.
Rate(const std::string &name, const double timeStep)
RateOptions & getOptions()
const timespec & getSleepStartTime() const
const timespec & getSleepEndTime() const
RateOptions options_
Rate options.
timespec lastErrorPrintTime_
Point in time when the last error message was printed.
timespec lastWarningPrintTime_
Point in time when the last warning message was printed.
double awakeTimeMean_
Mean of the time which elapsed between subsequent calls of sleep().
double getAwakeTimeVar() const
double awakeTimeM2_
Helper variable to compute the variance of the time step which elapsed between subsequent calls of sl...
timespec sleepStartTime_
Point in time when the most recent sleep() started.
unsigned int numErrors_
Counter storing how many times a time step took longer than the error threshold, not considering warn...
timespec sleepEndTime_
Point in time when the most recent sleep() ended.
const timespec & getStepTime() const
unsigned int getNumErrors() const
static double getDuration(const timespec &start, const timespec &end)
static constexpr double SEC_PER_N_SEC
Factor storing seconds per nanoseconds.