Quote:
Originally Posted by Egg 3141592654
Timer.delay for wpilibj is in milliseconds, so 1 second would be
|
The javadoc only says this:
Quote:
delay
public static void delay(double seconds)
Pause the thread for a specified time. Pause the execution of the thread for a specified period of time given in seconds. Motors will continue to run at their last assigned values, and sensors will continue to update. Only the task containing the wait will pause until the wait time is expired.
Parameters:
seconds - Length of time to pause
|
Note; "seconds". I'm pretty sure it's just in normal seconds. So one second would be
Code:
Timer.delay(1.0); // only accepts doubles as an argument
My team has had no problems using this, as opposed to using milliseconds(?).
However, when using other functions in the Timer class, like get(), it will return in
microseconds. For our minibot deployment, we start a timer and have a condition timer.get()/
1000000 > 110, if true it will deploy. If false, it'll let the user know you can't deploy yet.
