ClearCore system timer/stopwatch class.
This class provides generic timer functionality that can be inherited to use different time bases
ClearCore system timer/stopwatch class.
More...
#include <SysTimer.h>
|
| void | SetDelay (uint32_t delay) |
| | Set the delay of the timer.
|
| |
| void | Start (uint32_t delay) |
| | Starts the timer with a delay argument.
|
| |
|
void | Start () |
| | Starts the timer with the default or configured delay.
|
| |
| bool | Completed () |
| | Check to see if the timer has completed.
|
| |
| uint32_t | Elapsed () |
| | Check how much time has elapsed since the start of the timer.
|
| |
◆ Completed()
| bool ClearCore::SysTimer::Completed |
( |
| ) |
|
|
inline |
Check to see if the timer has completed.
- Note
- The timer will roll over after UINT32_MAX ticks have passed since starting the timer. You should be mindful of this rollover when choosing a time base for an application (every ~49.7 days for milliseconds, every ~71.5 minutes for microseconds)
- Returns
- True if the timer has completed
◆ Elapsed()
| uint32_t ClearCore::SysTimer::Elapsed |
( |
| ) |
|
|
inline |
Check how much time has elapsed since the start of the timer.
- Note
- The elapsed time will roll over after UINT32_MAX ticks have passed since starting the timer. You should be mindful of this rollover when choosing a time base for an application (every ~49.7 days for milliseconds, every ~71.5 minutes for microseconds)
- Returns
- The time elapsed in the time base of the timer class
◆ SetDelay()
| void ClearCore::SysTimer::SetDelay |
( |
uint32_t |
delay | ) |
|
|
inline |
Set the delay of the timer.
- Parameters
-
| [in] | delay | The delay for the timer in the time base of the timer class |
◆ Start()
| void ClearCore::SysTimer::Start |
( |
uint32_t |
delay | ) |
|
|
inline |
Starts the timer with a delay argument.
- Parameters
-
| [in] | delay | The delay for the timer in the time base of the timer class |
The documentation for this class was generated from the following file: