diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-25 19:55:28 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-01-23 23:08:21 +0100 |
commit | 7c43afa471703dcfb638e44f6609821a715348e3 (patch) | |
tree | 006d78d81f1fdf812ce4068976ba0e6d1284ccb4 | |
parent | b336ed89961c25ff39317b1f57e8aa4a70a0994c (diff) |
Core/Utilities: Add custom _days chrono literal
(cherry picked from commit d5de96e46bf52ccb2fffe01c0709f9238977a80e)
-rw-r--r-- | src/common/Utilities/Duration.h | 5 |
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_ |