here is a macro i wrote today to count the number of execution per second. I put the macro into a resident file to have it available all the time. Just call it with your code, e.g. the name of a procedure, like
Code: Select all
Profile(MyTestProc())
Code: Select all
Macro Profile(Code)
;run test code and count number of calls within a second
Define profile_count = 0
Define profile_start = ElapsedMilliseconds()
Repeat
Code
profile_count + 1
Until ElapsedMilliseconds() - profile_start > 1000
;show result
CompilerIf #PB_Compiler_Debugger
Debug profile_count
CompilerElse
MessageRequester("Profile", Str(profile_count))
CompilerEndIf
EndMacro
Best regards
Uwe