CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
CpuStats.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace cdc::core {
6
14class CpuStats {
15public:
23 static bool sample(uint64_t& idleUs, uint64_t& wallUs);
24
30 static uint8_t loadOverWindow(uint32_t windowMs = 250);
31};
32
33} // namespace cdc::core
On-demand aggregate CPU-load read-out from FreeRTOS run-time stats.
Definition CpuStats.h:14
static uint8_t loadOverWindow(uint32_t windowMs=250)
Measure aggregate CPU load over a blocking window.
Definition CpuStats.cpp:40
static bool sample(uint64_t &idleUs, uint64_t &wallUs)
Snapshot cumulative idle CPU time and the wall-clock reference.
Definition CpuStats.cpp:12