Class SleepTask

java.lang.Object
com.cdarobotics.cdalib.tasks.Task
com.cdarobotics.cdalib.tasks.SleepTask

public class SleepTask extends Task
A task that finishes after a fixed delay (in milliseconds) has elapsed since init().
  • Constructor Details

    • SleepTask

      public SleepTask(long msDelay)
      Parameters:
      msDelay - how long to wait, in milliseconds, before the task finishes.
  • Method Details

    • init

      public void init()
      Description copied from class: Task
      Called once before the first Task.run(). Set up state and issue starting commands here.
      Specified by:
      init in class Task
    • run

      public boolean run()
      Description copied from class: Task
      Called every loop after Task.init().
      Specified by:
      run in class Task
      Returns:
      true when the task is finished, false to keep running.
    • toString

      @NonNull public String toString()
      Specified by:
      toString in class Task