Vizard 8 » Command Index » Vizard modules » viztask » <viztask>.waitDraw
8.0

<viztask>.waitDraw

Wait for the next frame to be drawn

<viztask>.waitDraw()  

Remarks

This command will create a Condition object that will wait for the next frame to be drawn. You should only use this condition if you need to know the time that the frame was drawn. If you just need to wait a single frame, then use <viztask>.waitFrame, or simply yield None.

The yielded command returns a viz.Data object with the following information about the condition:

Properties

time

Display time of the last frame

Return Value

viztask.Condition object

Example

import viztask

def MyTask():

    while True:

        d = yield viztask.waitDraw()

        print('Frame was drawn at time',d.time)

viztask.schedule( MyTask() )