de_twin.clock.Clock#
- class de_twin.clock.Clock(time_scale=1.0)[source]#
Bases:
objectReal-time clock, optionally scaled.
time_scale > 1makes simulated time run faster than wall time: an in-situ anneal that takes 10 minutes on the microscope can be replayed in one minute withtime_scale=10. Frame pacing still sleeps in wall time (frame_time / time_scale), so the whole twin speeds up consistently.- Parameters:
time_scale (float)
Methods
__init__([time_scale])now()Simulated seconds since the clock was created.
set_time_scale(time_scale)sleep(sim_seconds)sleep_until(sim_time)Attributes