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