benilla-re systems structs docs

FormatDuration

function · ui · primitive

Address
0x52fa50 · 375 bytes, up to 0x52fbc6
Signature
char * __fastcall (char *out, uint32_t size, uint32_t ms, const char *prefix, const char *extra, uint32_t round_up)
Meaning
Formats a duration in milliseconds as days, hours, minutes or seconds through a global string
Confidence
verified, proof one
Finding
ui/tooltipcontent#durations

Finding: Durations in ui: Tooltip lines, colours and sizing

A duration in milliseconds is written by one helper from a key prefix. It picks _DAYS at 86,400,000 and more, _HOURS at 3,600,000, _MIN at 60,000 and else _SEC, takes the ceiling of the count in the first three when asked and a floor in seconds, looks the key up, and prints the count; an extra argument is passed after the count. The plural variant of the key is chosen by the interface's own function: a count of 1 uses the singular spelling and every other count, 0 included, the plural.

The derivation is in the doc.

Callers 5

Callees 2

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