001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.wpilibj.command;
006
007/**
008 * A {@link WaitCommand} will wait for a certain amount of time before finishing. It is useful if
009 * you want a {@link CommandGroup} to pause for a moment.
010 *
011 * @see CommandGroup
012 */
013public class WaitCommand extends TimedCommand {
014  /**
015   * Instantiates a {@link WaitCommand} with the given timeout.
016   *
017   * @param timeout the time the command takes to run (seconds)
018   */
019  public WaitCommand(double timeout) {
020    this("Wait(" + timeout + ")", timeout);
021  }
022
023  /**
024   * Instantiates a {@link WaitCommand} with the given timeout.
025   *
026   * @param name the name of the command
027   * @param timeout the time the command takes to run (seconds)
028   */
029  public WaitCommand(String name, double timeout) {
030    super(name, timeout);
031  }
032}