Timer class for tracking elapsed time intervals.
More...
#include <time.hpp>
|
| | Timer (double interval_seconds) |
| | Constructor for Timer.
|
| bool | has_elapsed () const |
| | Check if the specified interval has elapsed.
|
| double | elapsed_seconds () const |
| | Get elapsed time in seconds.
|
|
void | reset () |
| | Reset the timer to current time.
|
| bool | reset_if_elapsed () |
| | Reset timer if interval has elapsed.
|
Timer class for tracking elapsed time intervals.
Provides functionality to check if a specific time interval has elapsed.
◆ Timer()
| synapse::Timer::Timer |
( |
double | interval_seconds | ) |
|
|
inlineexplicit |
Constructor for Timer.
- Parameters
-
| interval_seconds | Interval duration in seconds |
◆ elapsed_seconds()
| double synapse::Timer::elapsed_seconds |
( |
| ) |
const |
|
inline |
Get elapsed time in seconds.
- Returns
- Elapsed time in seconds since last reset
◆ has_elapsed()
| bool synapse::Timer::has_elapsed |
( |
| ) |
const |
|
inline |
Check if the specified interval has elapsed.
- Returns
- true if interval has elapsed, false otherwise
◆ reset_if_elapsed()
| bool synapse::Timer::reset_if_elapsed |
( |
| ) |
|
|
inline |
Reset timer if interval has elapsed.
- Returns
- true if timer was reset, false otherwise
The documentation for this class was generated from the following file:
- include/synapse-app-sdk/utils/time/time.hpp