From 5a443b287f6c39cfc07beb703d92301371410526 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 7 May 2024 10:44:26 -0400 Subject: [PATCH] xo-unit: + unit time constants --- include/xo/unit/quantity.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/xo/unit/quantity.hpp b/include/xo/unit/quantity.hpp index 9e62cd7e..c9676797 100644 --- a/include/xo/unit/quantity.hpp +++ b/include/xo/unit/quantity.hpp @@ -508,7 +508,14 @@ namespace xo { template inline constexpr auto year365s(Repr x) { return quantity(x); } + /** @brief a quantity representing 1 second of time, with compile-time unit representation **/ static constexpr auto second = seconds(1); + /** @brief a quantity representing 1 minute of time, with compile-time unit representation **/ + static constexpr auto minute = minutes(1); + /** @brief a quantity representing 1 hour of time, with compile-time unit representation **/ + static constexpr auto hour = hours(1); + /** @brief a quantity representing 1 day of time (exactly 24 hours), with compile-time unit representation **/ + static constexpr auto day = days(1); } /*namespace qty*/ // ----- volatility -----