CpuUsage.h
Go to the documentation of this file.
104 System.queueCallback([](void* param) { static_cast<CpuUsage*>(param)->calibrationLoop(); }, this);
TickType elapsedTicks() const
Get elapsed ticks since start() was last called.
Definition: PolledTimer.h:178
uint32_t getElapsedCycles()
Get the total number of CPU cycles since the last call to reset()
Definition: CpuUsage.h:43
Definition: CpuUsage.h:4
static bool queueCallback(TaskCallback32 callback, uint32_t param=0)
Queue a deferred callback.
uint32_t getMinLoopCycles()
Get the figure used as the baseline cycle count.
Definition: CpuUsage.h:51
void reset()
Reset counters to start a new update period.
Definition: CpuUsage.h:26
Class to provide a CPU usage indication based on task callback availability.
Definition: CpuUsage.h:9
unsigned getLoopIterations()
Get the number of task callbacks made so far.
Definition: CpuUsage.h:35
void begin(InterruptCallback ready)
Calibrate the baseline figure for minimum CPU usage.
Definition: CpuUsage.h:17
unsigned getUtilisation()
Get the CPU utilisation figure in 1/100ths of a percent.
Definition: CpuUsage.h:59