#include <modm/processing/timer/periodic_timer.hpp>
template<class Clock, class Duration>
class modm::GenericPeriodicTimer< Clock, Duration >
Generic periodic software timeout class for variable timebase and timestamp width.
- See also
- GenericTimeout
- Template Parameters
-
Clock | Used clock which inherits from modm::Clock, may have a variable timebase. |
Duration | Used timestamp which is compatible with the chosen Clock. |
- Author
- Fabian Greif
-
Niklas Hauser
template<class Clock , class Duration >
size_t modm::GenericPeriodicTimer< Clock, Duration >::execute |
( |
| ) |
|
|
inline |
For a duration of 0, this function will always expire, but only return 1.
- Returns
- the number of missed periods, or zero if not expired yet
template<class Clock , class Duration >
Wait until the periodic timer expired.
- Warning
- This is a blocking call! Inside a fiber, this function yields.
- Returns
- the number of missed periods
The documentation for this class was generated from the following file: