aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarbenium <carbenium@outlook.com>2020-07-25 19:55:28 +0200
committerShauren <shauren.trinity@gmail.com>2022-01-23 23:08:21 +0100
commit7c43afa471703dcfb638e44f6609821a715348e3 (patch)
tree006d78d81f1fdf812ce4068976ba0e6d1284ccb4 /src
parentb336ed89961c25ff39317b1f57e8aa4a70a0994c (diff)
Core/Utilities: Add custom _days chrono literal
(cherry picked from commit d5de96e46bf52ccb2fffe01c0709f9238977a80e)
Diffstat (limited to 'src')
-rw-r--r--src/common/Utilities/Duration.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/Utilities/Duration.h b/src/common/Utilities/Duration.h
index 7eb349e6d85..f506467abda 100644
--- a/src/common/Utilities/Duration.h
+++ b/src/common/Utilities/Duration.h
@@ -39,4 +39,9 @@ typedef std::chrono::system_clock::time_point SystemTimePoint;
/// Makes std::chrono_literals globally available.
using namespace std::chrono_literals;
+constexpr std::chrono::hours operator""_days(unsigned long long days)
+{
+ return std::chrono::hours(days * 24h);
+}
+
#endif // _DURATION_H_