Package edu.wpi.first.wpilibj.command
Class WaitCommand
- java.lang.Object
-
- edu.wpi.first.wpilibj.SendableBase
-
- edu.wpi.first.wpilibj.command.Command
-
- edu.wpi.first.wpilibj.command.TimedCommand
-
- edu.wpi.first.wpilibj.command.WaitCommand
-
- All Implemented Interfaces:
Sendable
,AutoCloseable
public class WaitCommand extends TimedCommand
AWaitCommand
will wait for a certain amount of time before finishing. It is useful if you want aCommandGroup
to pause for a moment.- See Also:
CommandGroup
-
-
Constructor Summary
Constructors Constructor Description WaitCommand(double timeout)
Instantiates aWaitCommand
with the given timeout.WaitCommand(String name, double timeout)
Instantiates aWaitCommand
with the given timeout.
-
Method Summary
-
Methods inherited from class edu.wpi.first.wpilibj.command.TimedCommand
isFinished
-
Methods inherited from class edu.wpi.first.wpilibj.command.Command
cancel, clearRequirements, doesRequire, end, execute, getGroup, initialize, initSendable, interrupted, isCanceled, isCompleted, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled
-
Methods inherited from class edu.wpi.first.wpilibj.SendableBase
addChild, close, free, getName, getSubsystem, setName, setName, setName, setSubsystem
-
-
-
-
Constructor Detail
-
WaitCommand
public WaitCommand(double timeout)
Instantiates aWaitCommand
with the given timeout.- Parameters:
timeout
- the time the command takes to run (seconds)
-
WaitCommand
public WaitCommand(String name, double timeout)
Instantiates aWaitCommand
with the given timeout.- Parameters:
name
- the name of the commandtimeout
- the time the command takes to run (seconds)
-
-