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
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | uint32_t | m_id | Holds the timer id, its index in the timer table | verified, proof two | core/events#timers |
0x0004 | 12 | void *[3] | m_heapNode | Holds the heap node: vtable 0x801368, owning heap and index | verified, proof two | core/events#timers |
0x0010 | 4 | uint32_t | m_dueTime | Holds the clock time the timer fires, the heap key | verified, proof two | core/events#timers |
0x0014 | 4 | float | m_delaySeconds | Holds the delay times 0.001f, passed to the function | verified, proof two | core/events#timers |
0x0018 | 4 | void * | m_function | Holds the function called as fastcall(&{delay, now}, argument) | verified, proof two | core/events#timers |
0x001c | 4 | void * | m_argument | Holds the argument passed to the function in edx | verified, proof two | core/events#timers |
0x0020 | 4 | void * | m_functionEx | Holds the second form of function, called with two stack arguments | verified, proof two | core/events#timers |
0x0028 | 8 | uint32_t[2] | m_exStackArguments | Holds the two stack arguments of the second form | verified, proof two | core/events#timers |
0x0030 | 4 | void * | m_exArgument | Holds the edx argument of the second form | verified, proof two | core/events#timers |