Profiling::CpuUsage Class Reference
Class to provide a CPU usage indication based on task callback availability. More...
#include <CpuUsage.h>
Public Member Functions | |
void | begin (InterruptCallback ready) |
Calibrate the baseline figure for minimum CPU usage. More... | |
void | reset () |
Reset counters to start a new update period. More... | |
unsigned | getLoopIterations () |
Get the number of task callbacks made so far. More... | |
uint32_t | getElapsedCycles () |
Get the total number of CPU cycles since the last call to reset() More... | |
uint32_t | getMinLoopCycles () |
Get the figure used as the baseline cycle count. More... | |
unsigned | getUtilisation () |
Get the CPU utilisation figure in 1/100ths of a percent. More... | |
Detailed Description
Class to provide a CPU usage indication based on task callback availability.
Member Function Documentation
◆ begin()
|
inline |
Calibrate the baseline figure for minimum CPU usage.
- Parameters
-
ready Function to call when calibration is complete
- Note
- Typically call this in
init()
◆ getElapsedCycles()
|
inline |
Get the total number of CPU cycles since the last call to reset()
◆ getLoopIterations()
|
inline |
Get the number of task callbacks made so far.
◆ getMinLoopCycles()
|
inline |
Get the figure used as the baseline cycle count.
◆ getUtilisation()
|
inline |
Get the CPU utilisation figure in 1/100ths of a percent.
◆ reset()
|
inline |
Reset counters to start a new update period.
The documentation for this class was generated from the following file: