[wpiutil] Use steady_clock directly on SystemCore (#8053)

Don’t offset it from program start time.

This will make it much easier to coordinate timestamps across the system.

Closes #8041
This commit is contained in:
Thad House
2025-07-04 06:18:03 -07:00
committed by GitHub
parent 44d42759a4
commit 0304f50141

View File

@@ -87,6 +87,9 @@ uint64_t wpi::NowDefault() {
// delta by 1,000,000
uint64_t delta_in_us = delta * 1000000ull / frequency_val;
return delta_in_us + zerotime_val;
#elif defined(__FRC_SYSTEMCORE__)
// We want clock synchronized across the system, so just use steady_clock.
return timestamp();
#else
return zerotime_val + timestamp() - offset_val;
#endif