diff options
Diffstat (limited to 'src/timer.hpp')
| -rw-r--r-- | src/timer.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/timer.hpp b/src/timer.hpp index 6972e372..43637b36 100644 --- a/src/timer.hpp +++ b/src/timer.hpp @@ -20,10 +20,13 @@ struct Ns friend Ns operator+(const Ns& lhs, const Ns& rhs); friend Ns operator-(const Ns& lhs, const Ns& rhs); friend Ns operator*(const Ns& lhs, uint64_t rhs); + friend Ns operator*(uint64_t lhs, const Ns& rhs); + friend uint64_t operator/(const Ns& lhs, const Ns& rhs); friend Ns operator/(const Ns& lhs, uint64_t rhs); friend uint64_t operator%(const Ns& lhs, const Ns& rhs); friend Ns operator%(const Ns& lhs, uint64_t rhs); + friend bool operator==(const Ns& lhs, const Ns& rhs); friend std::strong_ordering operator<=>(const Ns& lhs, const Ns& rhs); }; @@ -33,7 +36,7 @@ struct Time final static Time now() noexcept; bool operator==(const Time&) const noexcept; std::strong_ordering operator<=>(const Time&) const noexcept; - friend Ns operator-(const Time& a, const Time& b) noexcept; + friend Ns operator-(const Time& lhs, const Time& rhs) noexcept; [[nodiscard]] Ns update(const Time& ts = now()) & noexcept; static float to_seconds(const Ns& ts) noexcept; @@ -45,6 +48,8 @@ private: static uint64_t init() noexcept; }; +Debug& operator<<(Debug& dbg, Ns box); + constexpr inline size_t fm_DATETIME_BUF_SIZE = 32; const char* format_datetime_to_string(char(&buf)[fm_DATETIME_BUF_SIZE]); |
