How can I run energy simulation for a specific duration?

@Gspahr thank you very much. That helped a lot!