Stop Watch.

Moderator: Benj

Post Reply
medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Stop Watch.

Post by medelec35 »

I had posted about this on version 3, and would still like to se it implemented within version 4.
medelec35 wrote:If this real time is then resettable, you set a break point and time to zero at the start of a loop, and set a break point at the end of a loop,
and real time is displayed how long loop to take to complete
Martin

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Stop Watch.

Post by medelec35 »

Comments are welcome... Good or bad!
Martin

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Stop Watch.

Post by Steve »

I'm not sure what you mean by this.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Stop Watch.

Post by medelec35 »

Suppose you have a loop and would like to time how long loop takes to complete.
When simulation is paused at the start of the loop, you can zero the stop watch. Then simulation runs for duration of loop you would like to time. At the end of the loop i.e where you have set a breakpoint, the stop watch stops, displaying the time that would of passed if ran on real hardware.
Martin

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: Stop Watch.

Post by Steve »

I see. It's a good idea, but I'm not sure it's possible.

The problem is that Flowcode produces C and this C is turned into code by an external compiler. The exact nature of this compiled code is unknown to Flowcode, and even simple actions can be optimized by the compiler in different ways. And the optimization options for the compiler can be set in different ways by the user.

Also note that different versions of Flowcode (PIC, AVR, ARM) use different compilers, and hence have different timings.

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Stop Watch.

Post by medelec35 »

Thanks Steve. Its not a problem if can not be implemented.
I was just thinking of some ideas.
Martin

Post Reply