#include <fixed_frequency_loop.hpp>
◆ FixedFrequencyLoop()
| FixedFrequencyLoop::FixedFrequencyLoop |
( |
double | max_update_rate_hz = 60 | ) |
|
|
inline |
◆ get_average_loop_stats()
◆ start()
| void FixedFrequencyLoop::start |
( |
const std::function< void(double)> & | rate_limited_func, |
|
|
const std::function< bool()> & | termination_condition_func, |
|
|
std::function< void(IterationStats)> | loop_stats_function = [](IterationStats is) {} ) |
a sleep based loop that runs a function at a fixed interval
- Note
- you probably want to run this in its own thread so the sleep doesn't pause your whole program, unless this is your "whole program"
- Author
- cuppajoeman
◆ iteration_stats_history
| std::deque<IterationStats> FixedFrequencyLoop::iteration_stats_history |
◆ max_update_rate_hz
| double FixedFrequencyLoop::max_update_rate_hz |
◆ rate_limiter_enabled
| bool FixedFrequencyLoop::rate_limiter_enabled = true |
◆ stopwatch
The documentation for this class was generated from the following files: