def simulation_informations(self): """ """ information = '<br/><b>Simulation</b><br/>' hours, minutes, seconds = lib.get_simulation_time() information += 'Time elapsed : ' + str(hours) + '<sup>h</sup> ' + str(minutes) + '<sup>m</sup> ' + str(seconds) + '<sup>s</sup><br/>' information += 'Speed : ×' + str(lib.round(lib.get_speed(), 2)) + '<br/>' if lib.delta_t != 0: information += 'FPS : ' + str(lib.round(lib.get_speed()/lib.delta_t, 2)) + '<br/>' information += 'Δt (s) : ' + str(lib.round(lib.delta_t, 2)) + '<br/>' return information
def simulation_informations(self): """ """ information = '<br/><b>Simulation</b><br/>' hours, minutes, seconds = lib.get_simulation_time() information += 'Time elapsed : ' + str( hours) + '<sup>h</sup> ' + str( minutes) + '<sup>m</sup> ' + str( seconds) + '<sup>s</sup><br/>' information += 'Speed : ×' + str(lib.round(lib.get_speed(), 2)) + '<br/>' if lib.delta_t != 0: information += 'FPS : ' + str( lib.round(lib.get_speed() / lib.delta_t, 2)) + '<br/>' information += 'Δt (s) : ' + str(lib.round(lib.delta_t, 2)) + '<br/>' return information
def fastforward_simulation(self): """ Plays the simulation at 2, 4 or 8× """ sim_speed = lib.get_speed() if sim_speed == 2: lib.set_speed(4) elif sim_speed == 4: lib.set_speed(8) elif sim_speed == 8: lib.set_speed(1) else: lib.set_speed(2)