mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpilib] Deprecate Timer::HasPeriodPassed() (#3598)
AdvanceIfElapsed() is safer to use, as it has less surprising side effects.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <units/time.h>
|
||||
#include <wpi/deprecated.h>
|
||||
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user