Get simulation time

Hey all,

I guess this is a dumb question, but how can I get the current simulation time ?

I tried the omni.timeline.ITimeline.get_current_time() it was always returning 0.
I tried the omni.physx.bindings._physx.IPhysxAuthoring.get_elapsed_time, this returned the dt.

I am sure there is something much simpler to get the current time but I could not find it. Anyone knows how ?



  • In order for timeline to move forward, play() must be called or pressed in the UI

  • The timeline will by default loop from zero to the end time code set in the layer tab

  • If you want a higher level interface to managing the simulation and time we have a few standalone samples you can run in 2021.2.0 via ./
    ./ standalone_examples/api/omni.isaac.core/
    There is a new SimulationContext class that provides more control over rendering/update and physics stepping Simulation Context API

  • There is a second example ./ standalone_examples/api/omni.isaac.core/ that shows the different ways you can step simulation and rendering.

Thanks ! I’ll check them out. I had pressed play in the UI, and I was using the python scripting window to try and get the time. Maybe I was missing an extension.

Thanks for letting me know about that class, it looks practical !