mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Timer: add hasElapsed, advanceIfElapsed (#2322)
The current hasPeriodPassed() function is confusing. In preparation for deprecating it, add new advanceIfElapsed() function with same functionality and hasElapsed() function which only checks that the time period has elapsed and does not advance the timer. Also fix a couple of incorrect usages of hasPeriodPassed().
This commit is contained in:
@@ -138,5 +138,5 @@ void RamseteCommand::Execute() {
|
||||
void RamseteCommand::End(bool interrupted) { m_timer.Stop(); }
|
||||
|
||||
bool RamseteCommand::IsFinished() {
|
||||
return m_timer.HasPeriodPassed(m_trajectory.TotalTime());
|
||||
return m_timer.HasElapsed(m_trajectory.TotalTime());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user