001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) FIRST 2016-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 TimedCommand} will wait for a timeout before finishing. 012 * {@link TimedCommand} is used to execute a command for a given amount of time. 013 */ 014public class TimedCommand extends Command { 015 public TimedCommand(String name, double timeout) { 016 super(name, timeout); 017 } 018 019 public TimedCommand(double timeout) { 020 super(timeout); 021 } 022 023 protected boolean isFinished() { 024 return isTimedOut(); 025 } 026}