Action
Returns a timer’s elapsed time as a real number.
Syntax
rElapsed = TimerValue (hTimer)
Variable
|
Description
|
rElapsed
|
The elapsed time. REAL.
|
hTimer
|
A handle to the timer to query. HTIMER.
|
Notes
TimerValue returns the elapsed time that the specified timer has
been running, in seconds. The value returned is accurate to the
millisecond (.001 seconds).
The elapsed time that TimerValue returns is the time that has
elapsed since the timer was started (with TimerStart), minus the
time (if any) it was paused.
Example
REAL rElapsed
HTIMER ElapsedTimer
ElapsedTimer = TimerCreate ()
TimerStart (ElapsedTimer)
// ...
TimerStop (ElapsedTimer)
// get elapsed time as real number
rElapsed = TimerValue (ElapsedTimer)
Print ("This code executed in {rElapsed}seconds")