|
SatCat5
|
TimeRef and TimeVal define the API for monotonic timers.
The TimeRef API (formerly GenericTimer) provides various methods for measuring elapsed time with a tick-counting time reference.
A SatCat5 design may have many TimeRef objects. The global "timekeeper" (see polling.h) selects one as the preferred general-purpose system reference. Access the system reference using the SATCAT5_CLOCK macro, which returns a TimeRef pointer.
Each TimeRef may be backed by a hardware counter, a timer interrupt, or software. User-defined implementations must meet the following:
SatCat5 provides several reference implementations:
Definition in file timeref.h.
Go to the source code of this file.
Classes | |
| struct | satcat5::util::TimeVal |
| Timestamp for measuring elapsed time. More... | |
| class | satcat5::util::TimeRef |
| The TimeRef API provides access to a monotonic time-counter. More... | |
| class | satcat5::util::NullTimer |
| Placeholder used if no timer is available. More... | |
| class | satcat5::util::TimeRegister |
| Implement TimeRef API using a memory-mapped performance counter. More... | |