Time a function: Difference between revisions
Content added Content deleted
Line 533: | Line 533: | ||
TimeFunction(Function, Parameters*) { |
TimeFunction(Function, Parameters*) { |
||
SetBatchLines, -1 |
SetBatchLines, -1 ; SetBatchLines sets the speed of which every new line of coe is run. |
||
DllCall("QueryPerformanceCounter", "Int64*", CounterBefore) ; Start the counter. |
DllCall("QueryPerformanceCounter", "Int64*", CounterBefore) ; Start the counter. |
||
DllCall("QueryPerformanceFrequency", "Int64*", Freq) ; Get the frequency of the counter. |
DllCall("QueryPerformanceFrequency", "Int64*", Freq) ; Get the frequency of the counter. |
||
%Function%(Parameters*) |
%Function%(Parameters*) ; Call the function with it's parameters. |
||
DllCall("QueryPerformanceCounter", "Int64*", CounterAfter) ; End the counter. |
DllCall("QueryPerformanceCounter", "Int64*", CounterAfter) ; End the counter. |
||