timer()
dtimer()
High precision timer function. Measures the time between two calls in microseconds.
Used for performance testing of functions and instructions.
Returns:
Time since the last timer() call in microseconds (1/1000000 sec), var (timer) or double (dtimer).
Remarks:
- This instruction uses the Pentium high-precision performance counter.
- The returned value has a precision of a few nanoseconds, depending
on the processor clock rate.
-
Due to the limited var range, the timer() function can only measure time within one frame. For time periods that span several frames, the dtimer() function that returns a double value, or the total_ticks counter can be used.
Speed:
Fast
Example:
...
timer();
c_trace(vec_from,vec_to,mode);
time_elapsed = timer(); // processor time used for the c_trace call
...
See Also:
time_step, total_ticks, wait
► latest
version online