001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2008-2017. All Rights Reserved. */ 003/* Open Source Software - may be modified and shared by FRC teams. The code */ 004/* must be accompanied by the FIRST BSD license file in the root directory of */ 005/* the project. */ 006/*----------------------------------------------------------------------------*/ 007 008package edu.wpi.first.wpilibj.command; 009 010/** 011 * A {@link WaitCommand} will wait for a certain amount of time before finishing. It is useful if 012 * you want a {@link CommandGroup} to pause for a moment. 013 * 014 * @see CommandGroup 015 */ 016public class WaitCommand extends TimedCommand { 017 018 /** 019 * Instantiates a {@link WaitCommand} with the given timeout. 020 * 021 * @param timeout the time the command takes to run 022 */ 023 public WaitCommand(double timeout) { 024 this("Wait(" + timeout + ")", timeout); 025 } 026 027 /** 028 * Instantiates a {@link WaitCommand} with the given timeout. 029 * 030 * @param name the name of the command 031 * @param timeout the time the command takes to run 032 */ 033 public WaitCommand(String name, double timeout) { 034 super(name, timeout); 035 } 036}