Section 7: Command reference
Models 707B and 708B Switching Matrix Reference Manual
7-200
707B-901-01 Rev. A / August 2010
Example 2
-- decimal 18 = binary 0000 0000 0001 0010
enableRegister = 18
status.system5.enable = enableRegister
Sets BIT1 and BIT5 of the status system
enable register set 5 register using a
decimal value.
Also see
System summary bit (System register)
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
Returns the elapsed time in seconds (1
μ
s resolution)
Details
The returned resolution for time depends on how long it has been since the timer was reset. It starts with 1
μ
s
resolution and starts to lose resolution after about 2.8 minutes.
Example 1
timer.reset()
...
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