mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[sim] Change stepTiming to take seconds (#2599)
This is consistent with other WPILib timer functions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user