Package org.chsrobotics.lib.commands
Class TimerCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.CommandBase
org.chsrobotics.lib.commands.TimerCommand
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable
,edu.wpi.first.wpilibj2.command.Command
public class TimerCommand
extends edu.wpi.first.wpilibj2.command.CommandBase
Command which starts a timer when it is scheduled.
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj2.command.Command
edu.wpi.first.wpilibj2.command.Command.InterruptionBehavior
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the time in seconds since the command was scheduled.void
Methods inherited from class edu.wpi.first.wpilibj2.command.CommandBase
addRequirements, getName, getRequirements, getSubsystem, initSendable, setName, setSubsystem
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.wpi.first.wpilibj2.command.Command
alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineWith, end, execute, finallyDo, getInterruptionBehavior, handleInterrupt, hasRequirement, ignoringDisable, isFinished, isScheduled, perpetually, raceWith, repeatedly, runsWhenDisabled, schedule, unless, until, withInterrupt, withInterruptBehavior, withName, withTimeout
-
Constructor Details
-
TimerCommand
public TimerCommand()Constructs a TimerCommand.
-
-
Method Details
-
initialize
public void initialize() -
getTimeElapsed
public double getTimeElapsed()Returns the time in seconds since the command was scheduled.- Returns:
- The time since scheduling.
-