diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 17:34:04 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-03-01 17:34:04 +0100 |
| commit | 10e22ed4fb0bd21d9d268c5c6f1ac1c7d9e4b621 (patch) | |
| tree | 56e4c085cb9d29f4d2db19e208d57e983a1aa318 /src/timer.cpp | |
| parent | 9a0399ae67ad378d2f746114dd297230104cf018 (diff) | |
w
Diffstat (limited to 'src/timer.cpp')
| -rw-r--r-- | src/timer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/timer.cpp b/src/timer.cpp index f663aaf0..8e9ed917 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -65,6 +65,11 @@ const char* format_datetime_to_string(char (&buf)[fm_DATETIME_BUF_SIZE]) return buf; } - +Ns operator-(const Time& lhs, const Time& rhs) noexcept +{ + auto a = lhs.stamp, b = rhs.stamp; + fm_assert(a >= b); + return Ns{a - b}; +} } // namespace floormat |
