[wpilib] Add timestamp getters with configurable time base (#7378)

This commit is contained in:
Jonah Bonner
2024-11-16 10:43:38 -05:00
committed by GitHub
parent 91142ba5fe
commit ca51197486
27 changed files with 180 additions and 53 deletions

View File

@@ -23,11 +23,11 @@ public class TimerTest extends AbstractComsSetup {
@Test
public void delayTest() {
// Given
long startTime = RobotController.getFPGATime();
long startTime = RobotController.getTime();
// When
Timer.delay(TIMER_RUNTIME / 1000000);
long endTime = RobotController.getFPGATime();
long endTime = RobotController.getTime();
long difference = endTime - startTime;
// Then