Section 7: TSP command reference
Models 707B and 708B Switching Matrix Reference Manual
7-200
707B-901-01 Rev. B / January 2015
Also see
(on page 7-196)
System summary bit (System register)
(on page C-5)
timer.measure.t()
This function measures the elapsed time since the timer was last reset.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
time
= timer.measure.t()
time
The elapsed time in seconds (1
µ
s resolution)
Example 1
timer.reset()
-- (intervening code)
time = timer.measure.t()
print(time)
Resets the timer and measures the time since the
reset.
Output:
1.01
The output will vary. The above output indicates that
timer.measure.t()
was executed 14.69077
seconds after
timer.reset()
.
Example 2
beeper.beep(0.5, 2400)
print("reset timer")
timer.reset()
delay(0.5)
dt = timer.measure.t()
print("timer after delay:", dt)
beeper.beep(0.5, 2400)
Sets the beeper, resets the timer, sets a delay, then
verifies the time of the delay before the next beeper.
Output:
reset timer
timer after delay: 5.00e-01
Also see
(on page 7-200)
timer.reset()
This function resets the timer to zero (0) seconds.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
timer.reset()