timer(): var
High precision timer function. Can be used to measures the time between calls for testing function execution speed and optimizing the script for faster training.
Returns:
Time elapsed since Zorro start in milliseconds (1/1000 sec).
Remarks:
- This function uses the Pentium performance counter register. The returned value has a precision of a few nanoseconds, depending
on the processor clock rate.
Example:
...
var Time = timer();
myfunction();
printf("\nmyfunction call time = %.3f ms",timer()-Time); // execution time in microsecond accuracy for the function call
...
See Also:
time functions, wait
► latest
version online