001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) 2008-2018 FIRST. 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 * Instantiates a {@link WaitCommand} with the given timeout. 019 * 020 * @param timeout the time the command takes to run (seconds) 021 */ 022 public WaitCommand(double timeout) { 023 this("Wait(" + timeout + ")", timeout); 024 } 025 026 /** 027 * Instantiates a {@link WaitCommand} with the given timeout. 028 * 029 * @param name the name of the command 030 * @param timeout the time the command takes to run (seconds) 031 */ 032 public WaitCommand(String name, double timeout) { 033 super(name, timeout); 034 } 035}