diff --git a/wpilibc/src/main/native/include/frc/Timer.h b/wpilibc/src/main/native/include/frc/Timer.h index ea71a0050a..a1a8bc7758 100644 --- a/wpilibc/src/main/native/include/frc/Timer.h +++ b/wpilibc/src/main/native/include/frc/Timer.h @@ -5,6 +5,7 @@ #pragma once #include +#include namespace frc { @@ -97,7 +98,9 @@ class Timer { * * @param period The period to check for. * @return True if the period has passed. + * @deprecated Use AdvanceIfElapsed() instead. */ + WPI_DEPRECATED("Use AdvanceIfElapsed() instead.") bool HasPeriodPassed(units::second_t period); /** diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Timer.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Timer.java index b4147795ad..17e1164c38 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/Timer.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/Timer.java @@ -134,7 +134,9 @@ public class Timer { * * @param period The period to check for (in seconds). * @return Whether the period has passed. + * @deprecated Use advanceIfElapsed() instead. */ + @Deprecated(since = "2022", forRemoval = true) public boolean hasPeriodPassed(double period) { return advanceIfElapsed(period); }