Tmr Function
Tmr function which returns the amount of time in seconds which has elapsed since the timer was started.
Syntax
Tmr(timerNumber)
Parameters
- timerNumber
- Specify an integer (0-63) which indicates one of the 64 timers to check, as an expression or numeric value.
Return Values
Elapsed time for the specified timer as a real number in seconds. Valid range is 0 to approx. 1.7E+31. Timer resolution is 0.001 seconds.
Description
Returns elapsed time in seconds since the timer specified was started. Unlike the ElapsedTime function, the Tmr function counts the time while the program is halted.
Timers are reset with TmReset.
Real overhead
TmReset 0
overHead = Tmr(0)
See Also
ElapsedTime Function, TmReset
Tmr Function Example
TmReset 0 'Resets Timer 0
For i = 1 To 10 'Performs operation 10 times
GoSub Cycle
Next
Print Tmr(0) / 10 'Calculates and display cycle time