steady_clock: Introduce a real time clock
This commit is contained in:
parent
dcd13a7566
commit
6f9918552c
2 changed files with 36 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue