waitfor


Purpose
Wait for events of particular classes.
Synopsis
procedure waitfor(mask:integer)
procedure waitfor(mask:integer,dur:integer)
Arguments
dur 
A duration in seconds
mask 
Bit mask of expected events
Further information
1. This procedure suspends the execution of the caller until an event of a particular class is available. The second form specifies a time limit: the processing is suspended for at most dur seconds.
2. The parameter mask is interpreted as a bit mask to select the expected events: all events sent to the model are automatically dropped until an event ev satisfies the following condition:
bittest(getclass(ev),mask)<>0

Related topics
send, wait, isqueueempty, getnextevent, dropnextevent.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.