mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[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:
@@ -112,9 +112,9 @@ TEST_F(TimerTest, AdvanceIfElapsed) {
|
||||
EXPECT_FALSE(timer.AdvanceIfElapsed(400_ms));
|
||||
}
|
||||
|
||||
TEST_F(TimerTest, GetFPGATimestamp) {
|
||||
auto start = wpi::Timer::GetFPGATimestamp();
|
||||
TEST_F(TimerTest, GetMonotonicTimestamp) {
|
||||
auto start = wpi::Timer::GetMonotonicTimestamp();
|
||||
wpi::sim::StepTiming(500_ms);
|
||||
auto end = wpi::Timer::GetFPGATimestamp();
|
||||
auto end = wpi::Timer::GetMonotonicTimestamp();
|
||||
EXPECT_EQ(start + 500_ms, end);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user