* same as Thread t.wait()
*
* @return TRUE is all tasks finished, FALSE if timeout occurred
*/
public static boolean waitForAll(int timeout) {
TdTimer myTimer = new TdTimer();
while (!ThreadQueue.isQueueIdle()) {
sleep(sleepTime);
if (myTimer.time() > timeout) {
return false;
}
}
return true;
}