Howdy, everyone.
I have a C program written for the MSP430. The program is basically just an infinite loop, with different sections within the loop:
while(1) { /* section 1 */ /* section 2 */ ..etc.. }
The various sections have some 'if' and 'else' statements, so they take different amounts of time from iteration to iteration. Is there any convenient mechanism to determine how long these various sections take? Even an average/mean time would work (although a probability distribution function would be best).
Earlier, I resorted to using the actual MSP430 hardware to run a million iterations of each individual section, and used a handheld stopwatch to time it (I had it turn an LED off when it finished). This was a pain, and now I don't actually have the hardware anymore. So, I'm hoping for a software simulation tool.
Any help will be greatly appreciated.
-Chess