For `sim.dynamics`, update time variable `t` with current simulation time
For
sim.dynamics, update time variabletwith current simulation time