Thread: Java Threads
View Single Post
  #8   Spotlight this post!  
Unread 13-03-2011, 17:06
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Java Threads

Quote:
Originally Posted by wdell View Post
You might try replacing the sleep() function with Timer.delay(), I think that would get rid of the try..catch statements.
Sleep() makes the thread not runnable so it releases the processor so it doesn't waste resources polling the clock. The sleeping thread becomes runnable again when the sleep period has expired.


How is Timer.delay() implemented?


Reply With Quote