de_twin.clock.ManualClock#
- class de_twin.clock.ManualClock(start=0.0)[source]#
Bases:
ClockClock that only moves when told to (deterministic tests, offline studies).
sleepadvances the clock instead of blocking, so paced frame loops run as fast as the CPU allows while still seeing correct simulated time.- Parameters:
start (float)
Methods
__init__([start])advance(seconds)now()Simulated seconds since the clock was created.
set(t)set_time_scale(time_scale)sleep(sim_seconds)sleep_until(sim_time)Attributes