[sim] Change stepTiming to take seconds (#2599)

This is consistent with other WPILib timer functions.
This commit is contained in:
Peter Johnson
2020-07-16 22:15:59 -07:00
committed by GitHub
parent c2cc90b27d
commit 9778445a74
3 changed files with 7 additions and 4 deletions

View File

@@ -28,7 +28,9 @@ void ResumeTiming() { HALSIM_ResumeTiming(); }
bool IsTimingPaused() { return HALSIM_IsTimingPaused(); }
void StepTiming(uint64_t delta) { HALSIM_StepTiming(delta); }
void StepTiming(units::second_t delta) {
HALSIM_StepTiming(static_cast<uint64_t>(delta.to<double>() * 1e6));
}
} // namespace sim
} // namespace frc