diff options
author | Carbenium <carbenium@outlook.com> | 2020-07-25 19:55:28 +0200 |
---|---|---|
committer | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-07-25 20:34:55 +0200 |
commit | d5de96e46bf52ccb2fffe01c0709f9238977a80e (patch) | |
tree | c1e54596ac6b5af18d8052ace8fb6e85276eeadf /src | |
parent | 796e2b32e03e7b1a56e44bd4b8988f9156bbb026 (diff) |
Core/Utilities: Add custom _days chrono literal
Diffstat (limited to 'src')
-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_ |