colosseumrl.FrameRateKeeper module

class colosseumrl.FrameRateKeeper.FrameRateKeeper(max_frame_rate: float)[source]

Bases: object

Class for maintaining frame rate on server and keeping track of timeouts.

start_timeout(seconds: float)[source]

Initiate a new timeout. You can only have one active timeout at a time.

Parameters

seconds (Number of seconds before triggering)

tick() → bool[source]

Wait for a single frame roll to finish before returning and check to see if we have timed out

Returns

bool

Return type

Whether or not we have timed out