mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-14 20:12:29 +00:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
965 changed files with 264882 additions and 0 deletions
27
src/event/EvtTimer.hpp
Normal file
27
src/event/EvtTimer.hpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef EVENT_EVT_TIMER_HPP
|
||||
#define EVENT_EVT_TIMER_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <storm/Queue.hpp>
|
||||
|
||||
class EvtTimer {
|
||||
public:
|
||||
// Member variables
|
||||
uint32_t id;
|
||||
TSTimerPriority<uint32_t> targetTime;
|
||||
float timeout;
|
||||
int32_t (*handler)(const void*, void*);
|
||||
void* param;
|
||||
int32_t (*guidHandler)(const void*, uint64_t, void*);
|
||||
uint64_t guidParam;
|
||||
void* guidParam2;
|
||||
};
|
||||
|
||||
class EvtTimerQueue : public TSPriorityQueue<EvtTimer> {
|
||||
public:
|
||||
EvtTimerQueue()
|
||||
: TSPriorityQueue<EvtTimer>(offsetof(EvtTimer, targetTime))
|
||||
{};
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue