mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[hal] Simplify monotonic_clock (#8678)
The epoch() function, zero() function, and min_time member are all not part of the std::chrono clock interface. The default constructor of time_point is [documented](https://en.cppreference.com/w/cpp/chrono/time_point/time_point.html) to initialize to the clock's epoch.
This commit is contained in:
@@ -66,8 +66,7 @@ class Tracer {
|
||||
static constexpr std::chrono::milliseconds kMinPrintPeriod{1000};
|
||||
|
||||
wpi::hal::monotonic_clock::time_point m_startTime;
|
||||
wpi::hal::monotonic_clock::time_point m_lastEpochsPrintTime =
|
||||
wpi::hal::monotonic_clock::epoch();
|
||||
wpi::hal::monotonic_clock::time_point m_lastEpochsPrintTime;
|
||||
|
||||
wpi::util::StringMap<std::chrono::nanoseconds> m_epochs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user