Section 14: TSP command reference
2470 High Voltage SourceMeter Instrument Reference Manual
14-192
2470-901-01 Rev. A /
May
2019
timer.cleartime()
This function resets the timer to zero (0) seconds.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
timer.cleartime()
Example
dataqueue.clear()
dataqueue.add(35)
timer.cleartime()
delay(0.5)
dt = timer.gettime()
print("Delay time was " .. dt)
print(dataqueue.next())
Clear the data queue, add 35 to it, and then
delay 0.5 seconds before reading it.
Output:
Delay time was 0.500099
35
Also see
(on page 14-192)
timer.gettime()
This function measures the elapsed time since the timer was last cleared.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
time
= timer.gettime()
time
The elapsed time in seconds (1 µs resolution)
Example
dataqueue.clear()
dataqueue.add(35)
timer.cleartime()
delay(0.5)
dt = timer.gettime()
print("Delay time was " .. dt)
print(dataqueue.next())
Clear the data queue, add 35 to it, and then
delay 0.5 seconds before reading it.
Output:
Delay time was 0.500099
35
Also see
(on page 14-192)