wait(n seconds)

Hello,

I am trying to use the wait function to wait for a thread I spawned, but I always get an "IllegalMonitorException". Could you please provide a code snippet on how to accomplish waiting for a given amount of time without using too much CPU?

 

Thanks,

Bernd

Thread.sleep(1000); waits for one second...

B