<viz>.elapsed

Returns the elapsed time of the current timer

 

<viz>.elapsed()

 

Remarks

NOTE: 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:',viz.elapsed(),'seconds'

viz.callback(viz.TIMER_EVENT,mytimer)
viz.starttimer(0,2.4)

See also

<viz>.callback
<viz>.starttimer
<viz>.killtimer
<viz>.play
<viz>.pause