benilla-re systems structs docs

EvtTimer

struct · core · 56 bytes

Meaning
Holds a timer: its id, heap node, due time, delay and the functions to call
Confidence
verified, proof two
Finding
core/events#timers

Finding: Timers in core: events

EventSetTimer (0x4200a0) takes a delay in milliseconds, a function and an argument, and returns a timer id for the current context: the last id freed, else the next, at least 1. The timer is due at now + delay; when the loop's timer phase finds it due, it is removed from the heap, its id is freed, and its function is called once as fastcall(&{delay · 0.001f, now}, argument) with the lock released. Due timers run in due-time order and the phase reads the clock once. EventKillTimer (0x4203e0) clears a timer's functions; a timer with none is dropped when it reaches the heap's top, and its id is freed then.

The derivation is in the doc.

Fields 9

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_idHolds the timer id, its index in the timer tableverified, proof twocore/events#timers
0x000412void *[3]m_heapNodeHolds the heap node: vtable 0x801368, owning heap and indexverified, proof twocore/events#timers
0x00104uint32_tm_dueTimeHolds the clock time the timer fires, the heap keyverified, proof twocore/events#timers
0x00144floatm_delaySecondsHolds the delay times 0.001f, passed to the functionverified, proof twocore/events#timers
0x00184void *m_functionHolds the function called as fastcall(&{delay, now}, argument)verified, proof twocore/events#timers
0x001c4void *m_argumentHolds the argument passed to the function in edxverified, proof twocore/events#timers
0x00204void *m_functionExHolds the second form of function, called with two stack argumentsverified, proof twocore/events#timers
0x00288uint32_t[2]m_exStackArgumentsHolds the two stack arguments of the second formverified, proof twocore/events#timers
0x00304void *m_exArgumentHolds the edx argument of the second formverified, proof twocore/events#timers