Ok, I will remember it.
Thanks.
Announcement
Collapse
No announcement yet.
Profiling
Collapse
X
-
Guest replied
-
MTIMER has a resolution of approx 2 micro-seconds (µSec) and is accurate to periods of less than 54 milli-seconds (mSec). Any code that takes longer than 54 mSec should use TIMER instead.
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Guest replied
Ok, THX.
I will try it in such a way.
But if I'm not wrong, I must use MTIMER instead of TIMER.
Regards Elek
------------------
this signature is no signature
Leave a comment:
-
It's simple enough in concept... if you are talking about the way PB/CC and PB/Win provide profiling facilities.
In each Sub/Function, wrap the code like this:
Code:SUB MySub() DIM X AS SINGLE X! = TIMER . . normal SUB code here . X! = TIMER - X! OPEN "Profile.txt" FOR APPEND AS #1 WRITE #1, "MySub", X! CLOSE #1 END SUB
Naturally, you'd be best to profile a DOS app under plain MSDOS so the effects of multi-tasking do not skew the results too much.
If you take it one step further, you could write an app that takes the source code of an existing app and merges in the code (as shown above) into each Sub/Function in the program, and saves the file under a new name. This would make it much easier to profile existing programs without the need to manually copy/paste the code into each Sub/Function.
I hope this helps!
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Profiling
I'm looking for hints, how I could realize something like profiling with a program coded in PB 3.2.
Any halp would be appreciated.
Regards ElekTags: None
Leave a comment: