benilla-re systems structs docs

MeasureCounterRate

function · gx · host

Address
0x595cf0 · 136 bytes, up to 0x595d77
Signature
float __cdecl (void)
Meaning
Measures the time-stamp counter's ticks per second over a 250 ms sleep once and returns it as a float
Confidence
verified, proof one
Finding
gx/slots#frame-counters

Finding: Frame counters in gx: the device's virtual slots

The base present adds 1 to the frame count +0x74, stores the frame rate at +0x70, clears the capture request and moves the frame's fifteen counters +0x70 to +0xa8 into +0x34 to +0x6c, zeroing all but the frame count and the texture count and bytes (+0x84, +0x88). The rate is __ftol(f * 64.0 / s), where s is the sum of the last 64 steps of the time-stamp counter between presents and f its ticks per second, and 99 when s is at most 1024. f is measured once: the counter's advance over Sleep(250), started at a GetTickCount change, times 4.

The derivation is in the doc.

Callers 1

Callees 2

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