SW Task Event Loop Framework v1.0.0
High-performance C++ asynchronous event loop framework with timer management and promise-based programming
Loading...
Searching...
No Matches
swt::TimerManager::TimerInfo Struct Reference

Internal timer information structure. More...

#include <TimerManager.h>

Collaboration diagram for swt::TimerManager::TimerInfo:
Collaboration graph

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)
 

Detailed Description

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.

Note
This is an internal structure and should not be used directly by client code.

Definition at line 152 of file TimerManager.h.

Member Data Documentation

◆ callback

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().

◆ cancelled

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().

◆ fd

int swt::TimerManager::TimerInfo::fd

timerfd file descriptor for Linux backend

Definition at line 154 of file TimerManager.h.

Referenced by swt::TimerManager::createTimer().

◆ id

TimerId swt::TimerManager::TimerInfo::id

Unique timer identifier.

Definition at line 162 of file TimerManager.h.

Referenced by swt::TimerManager::createTimer().

◆ interval_ms

uint64_t swt::TimerManager::TimerInfo::interval_ms

Timer interval in milliseconds.

Definition at line 161 of file TimerManager.h.

Referenced by swt::TimerManager::createTimer().

◆ periodic

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().


The documentation for this struct was generated from the following file: