public class TimedCommand extends Command
TimedCommand will wait for a timeout before finishing.
TimedCommand is used to execute a command for a given amount of time.| Constructor and Description |
|---|
TimedCommand(double timeout)
Instantiates a TimedCommand with the given timeout.
|
TimedCommand(java.lang.String name,
double timeout)
Instantiates a TimedCommand with the given name and timeout.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isFinished()
Ends command when timed out.
|
cancel, clearRequirements, doesRequire, end, execute, getGroup, initialize, initSendable, interrupted, isCanceled, isCompleted, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabledaddChild, free, getName, getSubsystem, setName, setName, setName, setSubsystemclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetName, getSubsystem, setName, setName, setSubsystempublic TimedCommand(java.lang.String name, double timeout)
name - the name of the commandtimeout - the time the command takes to run (seconds)public TimedCommand(double timeout)
timeout - the time the command takes to run (seconds)protected boolean isFinished()
isFinished in class CommandisTimedOut()