SW Task Event Loop Framework v1.0.0
High-performance C++ asynchronous event loop framework with timer management and promise-based programming
|
Internal timer information structure. More...
#include <TimerManager.h>
Public Attributes | |
int | fd |
timerfd file descriptor for Linux backend | |
std::function< void()> | callback |
User callback function to execute on timer expiry. | |
bool | periodic |
true for repeating timer, false for one-shot | |
uint64_t | interval_ms |
Timer interval in milliseconds. | |
TimerId | id |
Unique timer identifier. | |
std::atomic< bool > * | cancelled |
Pointer to cancellation flag (optional) | |
Internal timer information structure.
This structure holds all information needed to manage a timer, including backend-specific data and common properties. The structure uses a union to minimize memory usage when only one backend is compiled.
Definition at line 152 of file TimerManager.h.
std::function<void()> swt::TimerManager::TimerInfo::callback |
User callback function to execute on timer expiry.
Definition at line 159 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().
std::atomic<bool>* swt::TimerManager::TimerInfo::cancelled |
Pointer to cancellation flag (optional)
Definition at line 163 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().
int swt::TimerManager::TimerInfo::fd |
timerfd file descriptor for Linux backend
Definition at line 154 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().
TimerId swt::TimerManager::TimerInfo::id |
Unique timer identifier.
Definition at line 162 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().
uint64_t swt::TimerManager::TimerInfo::interval_ms |
Timer interval in milliseconds.
Definition at line 161 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().
bool swt::TimerManager::TimerInfo::periodic |
true for repeating timer, false for one-shot
Definition at line 160 of file TimerManager.h.
Referenced by swt::TimerManager::createTimer().