# Obtain frame time from the start to the end of my simulation in Isaac Sim

**URL:** <https://forum.aousd.org/t/obtain-frame-time-from-the-start-to-the-end-of-my-simulation-in-isaac-sim/929>\
**Category:** Build and Deployment\
**Created:** [November 14, 2023, 8:25am UTC](https://forum.aousd.org/t/obtain-frame-time-from-the-start-to-the-end-of-my-simulation-in-isaac-sim/929 "2023-11-14T08:25:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SitianShen](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@SitianShen](https://forum.aousd.org/u/SitianShen)\
**Post date:** [November 14, 2023, 8:25am UTC](https://forum.aousd.org/t/obtain-frame-time-from-the-start-to-the-end-of-my-simulation-in-isaac-sim/929/1 "2023-11-14T08:25:06Z")

</div>

I’m using some Python code to export the USD of a specific object on the stage, but I don’t know how to export a sequential USD, because I cannot get the frame time using python code after I click the button to start physical simulation. I tried to use these two AIPs:

start\_time = stage.GetStartTimeCode()  
end\_time = stage.GetEndTimeCode()

but they seem to be wrong.

So I would like to ask about methods or APIs (if there exists) to get the frame time from the start to the end of my simulation. Thanks a lot.

---

<div class="post-metadata">

**Author:** ![mati-nvidia](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/mati-nvidia/32/18_2.png) [@mati-nvidia](https://forum.aousd.org/u/mati-nvidia)\
**Post date:** [November 14, 2023, 5:08pm UTC](https://forum.aousd.org/t/obtain-frame-time-from-the-start-to-the-end-of-my-simulation-in-isaac-sim/929/2 "2023-11-14T17:08:45Z")

</div>

Hi @SitianShen. I think `Usd.Stage.GetStartTimeCode()` may be appropriate for your start time, but for your end time, you are probably looking for a point in time when your simulation reaches a state of rest. It’ll need to be calculated. The solution will almost certainly involve some Omniverse-specific API so I would recommend asking on the [Isaac Sim forum](https://forums.developer.nvidia.com/c/omniverse/simulation/69) or in the [#physics channel on the Omniverse Discord](https://discord.gg/nvidiaomniverse).

In those channels, you’ll find developers that are much more knowledgeable of that area of Omniverse than I am, but to not send you away without some help, one thought that came to mind is perhaps using [OmniPVD](https://docs.omniverse.nvidia.com/extensions/latest/ext_omnipvd.html) to record/bake the simulation and then you could potentially find the last timesample or the point in time to end based on the values in the timesample data.

---

<div class="post-metadata">

**Author:** ![SitianShen](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@SitianShen](https://forum.aousd.org/u/SitianShen)\
**Post date:** [November 15, 2023, 1:30pm UTC](https://forum.aousd.org/t/obtain-frame-time-from-the-start-to-the-end-of-my-simulation-in-isaac-sim/929/3 "2023-11-15T13:30:02Z")

</div>

Thanks a lot for your prompt response and guidance! I’ll have a look at the usage of OmniPVD and go to Isaac Sim forum for more detailed information.
