common: wall_clock: Utilize constants for ms, us, and ns ratios

This commit is contained in:
Morph 2022-01-30 12:36:56 -05:00
parent b7d23543b4
commit fe2ff6b8a1
3 changed files with 9 additions and 5 deletions

View file

@ -13,6 +13,10 @@ namespace Common {
class WallClock {
public:
static constexpr u64 NS_RATIO = 1'000'000'000;
static constexpr u64 US_RATIO = 1'000'000;
static constexpr u64 MS_RATIO = 1'000;
virtual ~WallClock() = default;
/// Returns current wall time in nanoseconds