Check precise timing

Forum Forums Visual Components 4.1 Python Programming in VC Check precise timing

This topic contains 4 replies, has 3 voices, and was last updated by Avatar haroon 1 year, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6927
    Avatar
    haroon
    Participant

    Hello,
    I want to check the precise timing of real time and virtual time of the simulation. I have my Python code, I want to simulate and get the amount of time the simulation takes during each iteration and run of code (loop). How to get the time of each iteration of the loop.
    I am using SimTime but its the virtual simulation time. I wanna get the real world run time of each loop executed.
    Also how to find the simulation time vs real time ratio.
    Thanks.

    #6929
    Avatar
    Dubs3pp
    Participant

    Hey haroon,

    if you pick “Real Time” under Simulation mode (the small gear symbol at the top of the screen) you should get the real times with SimTime.

    Best regards
    Dubsepp

    #6932
    eme
    eme
    Moderator

    The time module in python might be what you are looking for.

     

    #6940
    Avatar
    haroon
    Participant

    @dubs3pp
    No, its been a minute and the real time is still in 0:00:00

    @eme
    thanks but this gives the time of each loop of i in xrange(10000): right ?
    and why   a = i/(i+10) ??

    #6941
    Avatar
    haroon
    Participant

    @eme
    thanks but this gives the time of each loop of i in xrange(10000): right ?
    and why   a = i/(i+10) ??

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.