View Single Post
  #1   Spotlight this post!  
Unread 12-01-2011, 18:37
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: How do I use interrupt in Java?

Quote:
Originally Posted by danielcezar View Post
The only problem is that when i call sleep, the software stops at all, so i cant move the robot while this.

Should i call inside the thread or not?
You should call it in a separate thread if it blocks the execution of code you don't want blocked.

Perhaps you should take a step back and explain what it is that you are trying to accomplish instead of asking how to implement the solution that you've come up with. Chances are there is a better way to accomplish it.

-Joe
Reply With Quote