edu.wpi.first.wpilibj.command

## Class TimedCommand

- java.lang.Object
- - edu.wpi.first.wpilibj.command.Command
  - - edu.wpi.first.wpilibj.command.TimedCommand

- All Implemented Interfaces:
    NamedSendable, Sendable
  Direct Known Subclasses:
    WaitCommand

      public class TimedCommand
      extends Command

  A `TimedCommand` will wait for a timeout before finishing. `TimedCommand` is used to execute a command for a given amount of time.

- - ### Constructor Summary

    Constructors
    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.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `isFinished()` Ends command when timed out.

    - ### Methods inherited from class edu.wpi.first.wpilibj.command.Command

      `cancel, clearRequirements, doesRequire, end, execute, getGroup, getName, getSmartDashboardType, initialize, initTable, interrupted, isCanceled, isInterruptible, isRunning, isTimedOut, requires, setInterruptible, setRunWhenDisabled, setTimeout, start, timeSinceInitialized, toString, willRunWhenDisabled`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TimedCommand

          public TimedCommand(java.lang.String name,
                              double timeout)

      Instantiates a TimedCommand with the given name and timeout.
      Parameters:
        `name` - the name of the command
        `timeout` - the time the command takes to run (seconds)

    - #### TimedCommand

          public TimedCommand(double timeout)

      Instantiates a TimedCommand with the given timeout.
      Parameters:
        `timeout` - the time the command takes to run (seconds)

  - ### Method Detail

    - #### isFinished

          protected boolean isFinished()

      Ends command when timed out.
      Specified by:
        `isFinished` in class `Command`
      Returns:
        whether this command is finished.
      See Also:
        `isTimedOut()`