[hal,wpilib] Rename FPGA clock to monotonic clock (#8672)

- Remove status return from HAL level (clock getting should never fail)
- Remove 32-bit timestamp expand function
- Make monotonic_clock.hpp (formerly fpga_clock.hpp) header-only and
move to root hal include directory
This commit is contained in:
Peter Johnson
2026-03-15 15:08:41 -07:00
committed by GitHub
parent 1a5b023235
commit e944ae9aca
59 changed files with 233 additions and 358 deletions

View File

@@ -69,7 +69,7 @@ class LEDPatternTest {
@AfterEach
void tearDown() {
RobotController.setTimeSource(RobotController::getFPGATime);
RobotController.setTimeSource(RobotController::getMonotonicTime);
}
@Test

View File

@@ -127,10 +127,10 @@ class TimerTest {
@Test
@ResourceLock("timing")
void getFPGATimestampTest() {
double start = Timer.getFPGATimestamp();
void getMonotonicTimestampTest() {
double start = Timer.getMonotonicTimestamp();
SimHooks.stepTiming(0.5);
double end = Timer.getFPGATimestamp();
double end = Timer.getMonotonicTimestamp();
assertEquals(start + 0.5, end, 1e-9);
}
}