67 while (
nullptr != pclCurr) {
68 auto* pclNext = pclCurr->GetNext();
72 pclCurr->m_u32TimeLeft--;
73 if (0 == pclCurr->m_u32TimeLeft) {
75 if (
nullptr != pclCurr->m_pfCallback) {
76 pclCurr->m_pfCallback(pclCurr->m_pclOwner, pclCurr->m_pvData);
85 pclCurr->m_u32TimeLeft = pclCurr->m_u32Interval;
uint32_t m_u32Interval
Interval of the timer in timer ticks.
uint8_t m_u8Flags
Flags for the timer, defining if the timer is one-shot or repeated.
void Remove(Timer *pclLinkListNode_)
Remove Remove a timer from the TimerList, cancelling its expiry.
uint32_t m_u32TimeLeft
Time remaining on the timer.
uint32_t m_u32NextWakeup
The time (in system clock ticks) of the next wakeup event.
void Init()
Init Initialize the TimerList object. Must be called before using the object.
void Remove(T *pNode_)
Remove Add the linked list node to this linked list.
void ClearNode()
ClearNode.
void Add(T *pNode_)
Add Add the linked list node to this linked list.
Single include file given to users of the Mark3 Kernel API.
void Process()
Process Process all timers in the timerlist as a result of the timer expiring. This will select a new...
Mutex m_clMutex
Guards against concurrent access to the timer list - Only needed when running threaded.
void Init(bool bRecursive_=true)
Init Initialize a mutex object for use - must call this function before using the object...
static constexpr auto uTimerFlagOneShot
Timer is one-shot.
The Timer Class. This class provides kernel-managed timers, used to provide high-precision delays...
bool m_bTimerActive
Whether or not the timer is active.
static constexpr auto uTimerFlagActive
Timer is currently active.
Timer * GetHead()
GetHead Get the head node in the linked list.
void Add(Timer *pclListNode_)
Add Add a timer to the TimerList.
The LockGuard class. This class provides RAII locks based on Mark3's kernel Mutex object...
static constexpr auto uTimerFlagExpired
Timer is actually expired.