[wpilib] Add Timer::Restart() (#4963)

This commit is contained in:
Sriman Achanta
2023-01-23 17:50:46 -05:00
committed by GitHub
parent 00aa66e4fd
commit 917906530a
3 changed files with 29 additions and 0 deletions

View File

@@ -54,6 +54,14 @@ void Timer::Start() {
}
}
void Timer::Restart() {
if (m_running) {
Stop();
}
Reset();
Start();
}
void Timer::Stop() {
if (m_running) {
m_accumulatedTime = Get();