What steps will reproduce the problem?
1. checkout code (i had r1349)
2. build and install
3. programm a flash
What is the expected output? What do you see instead?
programming my STM32 flash takes around 4 seconds, measured with my wall-clock.
r1349 vsprog output is:
[...]
writing flash |========================================%100| 0.32s used
Info: flash programmed for 145408bytes(443.75KB/s)
[...]
what i would like to see is (generated with the attached patch):
[...]
writing flash |========================================%100| 4.03s used
Info: flash programmed for 145408bytes(35.23KB/s)
[...]
What version of the product are you using? On what operating system?
r1349
Please provide any additional information below.
For timing calculations in pgbar.c (and many other places), the function
clock() is used to determine current time.
The problem is, that clock() returns the processor time (consumed by the
application), not the wall time.
(Man-page says: "The clock() function returns an approximation of processor
time used by the program.")
The attached patch fixes the issue for the pgbar.c file, by replacing the
clock() calls with a function that calls clock_gettime().
Original issue reported on code.google.com by andreas....@gmail.com on 15 Oct 2012 at 4:50
Original issue reported on code.google.com by
andreas....@gmail.com
on 15 Oct 2012 at 4:50Attachments: