benilla-re systems structs docs

RecordQueuePosition

function · glue · primitive

Address
0x46ae50 · 148 bytes, up to 0x46aee3
Signature
void __fastcall (int32_t position)
Meaning
Shifts a queue position into the eight-sample history and recomputes the wait estimate when the queue moved
Confidence
verified, proof one
Finding
glue/flow#queue-history

Finding: Queue history in glue: the screen flow

The session hands each AUTH_WAIT_QUEUE position to 0x46ae50, which keeps eight (position, time) samples, newest first. When the position equals the newest and the oldest time is set, nothing shifts; otherwise each sample moves one older and the position becomes the newest. The newest time becomes now either way. Then, with the oldest time set and the newest position below the oldest, the estimate 0xb41df0 becomes −(trunc((now − t₇) / (p₀ − p₇)) · p₀) in 32-bit signed arithmetic: the divisor is negative, the quotient truncates toward zero, the multiply comes after and wraps. Otherwise the estimate keeps its value. Connecting (0x5aab20) zeroes it and the samples.

The derivation is in the doc.

Callers 1

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.