Sorry for the cross posting, I can't get an answer anywhere to this problem. Is nobody using the Performance counter???
Perhaps someone here can explain what i am doing wrong. I want the measure elapsed time at various stages of my code. I reset the timer and read it repeatedly I expected to get a cumulative elapsed time value. However this doesn't seem to work for me, I use this testing code:
ElapsedTime = GetPerformanceCounter(True);
_TRACE("#1 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(True);
_TRACE("#2 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(True);
_TRACE("#3 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(False);
_TRACE("#4 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(False);
_TRACE("#5 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(False);
_TRACE("#6 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(False);
_TRACE("#7 Elapsed time: "+NumToStr(ElapsedTime,1.3));
ElapsedTime = GetPerformanceCounter(False);
_TRACE("#8 Elapsed time: "+NumToStr(ElapsedTime,1.3));
_TRACE("#");
and I get this output:
[3176] #1 Elapsed time: 9505696.000
[3176] #2 Elapsed time: 0.142
[3176] #3 Elapsed time: 0.062
[3176] #4 Elapsed time: 0.061
[3176] #5 Elapsed time: 9505696.000
[3176] #6 Elapsed time: 9505696.000
[3176] #7 Elapsed time: 9505696.000
[3176] #8 Elapsed time: 9505696.000
[3176] #
Probably a dumb question, but how come output lines 5-8 do not show cumulative change wrt to the last reset?
many thanks for any help you can give,
herman
For Real-Time Auto-Trading Solutions visit the AmiBroker Users' Knowledge Base (UKB):
http://www.amibroker.org/userkb/
For specific Real-Time Auto-Trading solutions visit:
http://www.amibroker.org/userkb/category/real-time-auto-trading/
Best regards,
Herman
Wednesday, November 7, 2007, 7:10:06 AM, you wrote:
===8<===========End of original message text===========
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|