diff --git a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java index 9f040523d1..7e634cf5c9 100644 --- a/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java +++ b/wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/CommandScheduler.java @@ -530,6 +530,11 @@ public final class CommandScheduler implements Sendable, AutoCloseable { m_disabled = false; } + /** Prints list of epochs added so far and their times. */ + public void printWatchdogEpochs() { + m_watchdog.printEpochs(); + } + /** * Adds an action to perform on the initialization of any command by the scheduler. * diff --git a/wpilibNewCommands/src/main/native/cpp/frc2/command/CommandScheduler.cpp b/wpilibNewCommands/src/main/native/cpp/frc2/command/CommandScheduler.cpp index efeee4e644..f845cbc053 100644 --- a/wpilibNewCommands/src/main/native/cpp/frc2/command/CommandScheduler.cpp +++ b/wpilibNewCommands/src/main/native/cpp/frc2/command/CommandScheduler.cpp @@ -428,6 +428,10 @@ void CommandScheduler::Enable() { m_impl->disabled = false; } +void CommandScheduler::PrintWatchdogEpochs() { + m_watchdog.PrintEpochs(); +} + void CommandScheduler::OnCommandInitialize(Action action) { m_impl->initActions.emplace_back(std::move(action)); } diff --git a/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h b/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h index 1f8d74297a..fde2c6d3e3 100644 --- a/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h +++ b/wpilibNewCommands/src/main/native/include/frc2/command/CommandScheduler.h @@ -333,6 +333,11 @@ class CommandScheduler final : public wpi::Sendable, */ void Enable(); + /** + * Prints list of epochs added so far and their times. + */ + void PrintWatchdogEpochs(); + /** * Adds an action to perform on the initialization of any command by the * scheduler.