ElapsedTime Function
Returns the elapsed time since the takt time measurement timer starts in seconds.
Syntax
ElapsedTime
Return Values
An actual value representing an elapsed time of a takt time measurement timer. (Unit: second) Valid range is 0 to approx. 1.7E+31. Timer resolution is 0.001 seconds.
Description
Returns an elapsed time since the takt time measurement timer starts. Unlike the Tmr function, the ElapsedTime function does not count the time while the program is in pause state.
The takt time measurement timer can be reset by using ResetElapsedTime statement.
Real overhead
ResetElapsedTime
overHead = ElapsedTime
See Also
ResetElapsedTime, Tmr Function
ElapsedTime Function Example
ResetElapsedTime 'Resets the takt time measurement timer
For i = 1 To 10 'Executes 10 times
GoSub Cycle
Next
Print ElapsedTime / 10 'Measures a takt time and displays it