Governor¶
from acron.governor import Governor
- class Governor(*, adaptive: bool = True, scale: float = 1.0, period: float = 1.1, slow_ms: float = 23.0, fast_ms: float = 13.5, step_down: float = 0.08, step_up: float = 0.06, floor: float = 0.62, eps: float = 0.005, alpha: float = 0.08)¶
Bases:
objectRolling frame-time governor.
Measures a smoothed frame time and decides once per
period, so one expensive frame — a UI relayout, a tier change, a texture going up whole — never moves it. The constants are constructor arguments so a game can pin its own calibration; the defaults are a proven tuning for a 60 Hz target.Inheritance diagram
digraph inheritance368f58fa5c { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "Governor" [URL="acron.governor.Governor.html#acron.governor.Governor",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="Rolling frame-time governor."]; }