summaryrefslogtreecommitdiffhomepage
path: root/src/timer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.cpp')
-rw-r--r--src/timer.cpp7
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