ecoli.processes.global_clock

class ecoli.processes.global_clock.GlobalClock(parameters=None)[source]

Bases: Process

Track global time for Steps that do not rely on vivarium-core’s built-in time stepping (see Time Steps).

Parameters:

parameters (dict | None)

calculate_timestep(states)[source]

Subtract global time from next update times for each manually time-stepped processes to calculate time until a process updates. Use that time as the time step for this process so vivarium-core’s internal simulation clock advances by the same amount of time and processes that do not rely on this manual time stepping stay in sync with the ones that do.

name = 'global_clock'
next_update(timestep, states)[source]

The timestep that we increment global_time by is the same minimum time step that we calculated in calculate_timestep. This guarantees that we never accidentally skip over a process update time.

ports_schema()[source]