, the function returns instantly. Otherwise the thread is put into the state <b>WAITING</b>. Signal flags that are reported as event are automatically cleared.</p>
<p>The argument <em>millisec</em> specifies how long the system waits for the specified signal flags. While the system waits the tread calling this function is put into the state <b>WAITING</b>. The timeout value can have the following values:</p>
<ul>
<li>when <em>millisec</em> is 0, the function returns instantly.</li>
<li>when <em>millisec</em