steady_clock: Introduce a real time clock

This commit is contained in:
Morph 2023-03-04 22:59:04 -05:00
parent dcd13a7566
commit 6f9918552c
2 changed files with 36 additions and 0 deletions

View file

@ -20,4 +20,15 @@ struct SteadyClock {
[[nodiscard]] static time_point Now() noexcept;
};
struct RealTimeClock {
using rep = s64;
using period = std::nano;
using duration = std::chrono::nanoseconds;
using time_point = std::chrono::time_point<RealTimeClock>;
static constexpr bool is_steady = false;
[[nodiscard]] static time_point Now() noexcept;
};
} // namespace Common