timings.h File
C++ header file with declarations for the µTest++ timing utilities. More...
Included Headers
Namespaces Index
| namespace | micro_os_plus |
|
The primary namespace for the µOS++ framework. More... | |
| namespace | micro_test_plus |
|
Primary namespace for the µTest++ testing framework. More... | |
| namespace | detail |
|
Internal implementation details for the µTest++ framework. More... | |
Classes Index
| class | timestamp |
|
A single point-in-time measurement, wrapping a timespec value. More... | |
| class | timestamps |
|
A begin/end timestamp pair used to measure elapsed time. More... | |
Description
C++ header file with declarations for the µTest++ timing utilities.
This header provides two lightweight classes used to measure the elapsed time of test suites and test sessions within the µTest++ framework:
- timestamp wraps a single timespec value and records one point in time. It is default-constructible and trivially copyable.
- timestamps pairs a begin and an end timestamp (both stored as std::optional<timestamp>) and exposes methods for recording the start and finish of an operation, querying whether both timestamps are available, and computing the elapsed time in milliseconds and microseconds.
Timing support relies on clock_gettime(CLOCK_MONOTONIC_RAW, ...) when available; if the clock is not present (e.g. on bare-metal targets without an RTC) the timestamps are simply omitted and no timing information is reported.
All definitions reside within the micro_os_plus::micro_test_plus namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.
This file is intended solely for internal use within the framework and should not be included directly by user code.
File Listing
The file content with the documentation metadata removed is:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.