Open topic with navigation
<viz>.elapsed
Returns the elapsed time of the current timer
Remarks
This command should only be used inside a timer callback. When this command is called inside a timer callback it returns the time the timer has been waiting to expire.
Return Value
The elapsed time in seconds
Example
#The code below should print out:
#Elapsed time: 2.4 seconds
def mytimer(num):
print('Elapsed time: {:.1f} seconds'.format(viz.elapsed()))
viz.callback(viz.TIMER_EVENT,mytimer)
viz.starttimer(0,2.4)
See also