View Single Post
  #6   Spotlight this post!  
Unread 20-02-2010, 11:04
Geek 2.0 Geek 2.0 is offline
Registered User
FRC #0107
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2008
Location: Holland, MI
Posts: 120
Geek 2.0 will become famous soon enough
Re: Using TimerTasks

Thanks for the reassurance.

Here's another question... If I use Timer.delay() from the WPILibJ in a TimerTask, does that still pause ALL of your code? I wouldn't think so, because it only sleeps the current thread (as I understand it... I'm not sure).

Here's the delay() function in the Timer Class:

Code:
    public static void delay(final double seconds) {
        try {
            Thread.sleep((long) (seconds * 1e3));
        } catch (final InterruptedException e) {
        }
    }
Thanks!
Reply With Quote